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 66f83ea commit 6395bc4Copy full SHA for 6395bc4
1 file changed
mypy/typeops.py
@@ -34,6 +34,7 @@
34
from mypy.state import state
35
from mypy.types import (
36
ELLIPSIS_TYPE_NAMES,
37
+ NOT_IMPLEMENTED_TYPE_NAMES,
38
AnyType,
39
CallableType,
40
ExtraAttrs,
@@ -996,8 +997,10 @@ def is_singleton_identity_type(typ: ProperType) -> bool:
996
997
if isinstance(typ, NoneType):
998
return True
999
if isinstance(typ, Instance):
- return (typ.type.is_enum and len(typ.type.enum_members) == 1) or (
1000
- typ.type.fullname in ELLIPSIS_TYPE_NAMES
+ return (
1001
+ (typ.type.is_enum and len(typ.type.enum_members) == 1)
1002
+ or (typ.type.fullname in ELLIPSIS_TYPE_NAMES)
1003
+ or (typ.type.fullname in NOT_IMPLEMENTED_TYPE_NAMES)
1004
)
1005
if isinstance(typ, LiteralType):
1006
return typ.is_enum_literal() or isinstance(typ.value, bool)
0 commit comments