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
This adds on to the change in #17182
and fixes enum attributes being used as members.
Fixes: #16730
---------
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Ali Hamdan <[email protected]>
Co-authored-by: hauntsaninja <[email protected]>
Copy file name to clipboardExpand all lines: test-data/unit/pythoneval.test
-12
Original file line number
Diff line number
Diff line change
@@ -1555,18 +1555,6 @@ if isinstance(obj, Awaitable):
1555
1555
_testSpecialTypingProtocols.py:6: note: Revealed type is "Tuple[builtins.int]"
1556
1556
_testSpecialTypingProtocols.py:8: error: Statement is unreachable
1557
1557
1558
-
[case testEnumValueWithPlaceholderNodeType]
1559
-
# https://github.com/python/mypy/issues/11971
1560
-
from enum import Enum
1561
-
from typing import Callable, Dict
1562
-
class Foo(Enum):
1563
-
Bar: Foo = Callable[[str], None]
1564
-
Baz: Foo = Callable[[Dict[str, "Missing"]], None]
1565
-
[out]
1566
-
_testEnumValueWithPlaceholderNodeType.py:5: error: Incompatible types in assignment (expression has type "<typing special form>", variable has type "Foo")
1567
-
_testEnumValueWithPlaceholderNodeType.py:6: error: Incompatible types in assignment (expression has type "<typing special form>", variable has type "Foo")
1568
-
_testEnumValueWithPlaceholderNodeType.py:6: error: Name "Missing" is not defined
0 commit comments