Stubtest: verify the contents of `__all__` in a stub by AlexWaygood · Pull Request #12214 · python/mypy

@AlexWaygood mentioned this pull request

Feb 19, 2022

@AlexWaygood

@AlexWaygood

@AlexWaygood

@AlexWaygood

AlexWaygood added a commit to python/typeshed that referenced this pull request

Jun 8, 2022
It doesn't exist at runtime:

```python
>>> import dateparser.date
>>> dateparser.date.Self
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'dateparser.date' has no attribute 'Self'
```

...and it's not used in the stub either.

I'm not sure why stubtest didn't pick it up. My stubtest patch over at python/mypy#12214 _does_ pick it up (and I'm not sure why that is, either... but it's a true positive!)

@AlexWaygood

@AlexWaygood

hauntsaninja

@AlexWaygood AlexWaygood changed the title Stubtest: verify the presence and contents of __all__ in a stub Stubtest: verify the contents of __all__ in a stub

Jul 31, 2022

@AlexWaygood

hauntsaninja