You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stubtest: check _value_ for ellipsis-valued stub enum members (#19760)
Currently stubtest allows unsound definitions:
```python
# a.pyi
from enum import Enum
class E(Enum):
_value_: str
FOO = ...
```
```python
# a.py
from enum import Enum
class E(Enum):
FOO = 0
```
This PR teaches `stubtest` that `_value_` attribute
([spec](https://typing.python.org/en/latest/spec/enums.html#member-values))
should be used as a fallback in such case.
0 commit comments