We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daa6e56 commit ae54babCopy full SHA for ae54bab
CHANGELOG.md
@@ -2,6 +2,22 @@
2
3
## Next release
4
5
+### Change to enum membership semantics
6
+
7
+As per the updated [typing specification for enums](https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members),
8
+enum members must be left unannotated.
9
10
+```python
11
+class Pet(Enum):
12
+ CAT = 1 # Member attribute
13
+ DOG = 2 # Member attribute
14
+ # WOLF = ... # The "..." placeholder can be used in type stubs
15
16
+ species: str # Considered a non-member attribute
17
+```
18
19
+Contributed by Terence Honles in PR [17207](https://github.com/python/mypy/pull/17207).
20
21
## Mypy 1.13
22
23
We’ve just uploaded mypy 1.13 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
0 commit comments