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/pythoneval.test
-22Lines changed: 0 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1596,28 +1596,6 @@ if isinstance(obj, Awaitable):
1596
1596
_testSpecialTypingProtocols.py:6: note: Revealed type is "Tuple[builtins.int]"
1597
1597
_testSpecialTypingProtocols.py:8: error: Statement is unreachable
1598
1598
1599
-
[case testEnumValueWithPlaceholderNodeType]
1600
-
# https://github.com/python/mypy/issues/11971
1601
-
from enum import Enum
1602
-
from typing import Any, Callable, Dict
1603
-
class Foo(Enum):
1604
-
Bar: Foo = Callable[[str], None]
1605
-
Baz: Any = Callable[[Dict[str, "Missing"]], None]
1606
-
1607
-
reveal_type(Foo.Bar)
1608
-
reveal_type(Foo.Bar.value) # this should probably not be "Foo" https://typing.readthedocs.io/en/latest/spec/enums.html#member-values
1609
-
reveal_type(Foo.Baz)
1610
-
reveal_type(Foo.Baz.value)
1611
-
[out]
1612
-
_testEnumValueWithPlaceholderNodeType.py:5: error: Enum members must be left unannotated
1613
-
_testEnumValueWithPlaceholderNodeType.py:5: error: Incompatible types in assignment (expression has type "<typing special form>", variable has type "Foo")
1614
-
_testEnumValueWithPlaceholderNodeType.py:6: error: Enum members must be left unannotated
1615
-
_testEnumValueWithPlaceholderNodeType.py:6: error: Name "Missing" is not defined
1616
-
_testEnumValueWithPlaceholderNodeType.py:8: note: Revealed type is "Literal[_testEnumValueWithPlaceholderNodeType.Foo.Bar]?"
1617
-
_testEnumValueWithPlaceholderNodeType.py:9: note: Revealed type is "_testEnumValueWithPlaceholderNodeType.Foo"
1618
-
_testEnumValueWithPlaceholderNodeType.py:10: note: Revealed type is "Literal[_testEnumValueWithPlaceholderNodeType.Foo.Baz]?"
1619
-
_testEnumValueWithPlaceholderNodeType.py:11: note: Revealed type is "Any"
0 commit comments