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 02d1264 commit 0aa4867Copy full SHA for 0aa4867
1 file changed
test-data/unit/check-enum.test
@@ -2550,6 +2550,20 @@ class Pet(Enum):
2550
# E: Incompatible types in assignment (expression has type "ellipsis", variable has type "str")
2551
[builtins fixtures/enum.pyi]
2552
2553
+[case testEnumMemberFuzzyMatch]
2554
+from enum import Enum
2555
+
2556
+class Color(Enum):
2557
+ GREEN = 1
2558
+ RED = 2
2559
+ YELLOW = 3
2560
2561
+Color.GREN # E: "type[Color]" has no attribute "GREN"; maybe "GREEN"?
2562
+Color.YELOW # E: "type[Color]" has no attribute "YELOW"; maybe "YELLOW"?
2563
+Color.RDE # E: "type[Color]" has no attribute "RDE"
2564
+Color.BLUE # E: "type[Color]" has no attribute "BLUE"
2565
+[builtins fixtures/enum.pyi]
2566
2567
[case testEnumValueWithPlaceholderNodeType]
2568
# https://github.com/python/mypy/issues/11971
2569
from enum import Enum
0 commit comments