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
Copy file name to clipboardExpand all lines: test-data/unit/check-enum.test
+5-2
Original file line number
Diff line number
Diff line change
@@ -1788,14 +1788,17 @@ import lib
1788
1788
1789
1789
[file lib.pyi]
1790
1790
from enum import Enum
1791
-
class A(Enum):
1791
+
class A(Enum): # E: Detected enum "lib.A" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use `member = value` to mark an enum member, instead of `member: type` \
1792
+
# N: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
1792
1793
x: int
1793
1794
class B(A): # E: Cannot extend enum with existing members: "A"
1794
1795
x = 1 # E: Cannot override writable attribute "x" with a final one
1795
1796
1796
1797
class C(Enum):
1797
1798
x = 1
1798
-
class D(C): # E: Cannot extend enum with existing members: "C"
1799
+
class D(C): # E: Cannot extend enum with existing members: "C" \
1800
+
# E: Detected enum "lib.D" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use `member = value` to mark an enum member, instead of `member: type` \
1801
+
# N: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
0 commit comments