diff --git a/mypy/stubtest.py b/mypy/stubtest.py index 733504e8c234b..39b27a1f1ed32 100644 --- a/mypy/stubtest.py +++ b/mypy/stubtest.py @@ -1494,6 +1494,7 @@ def verify_typealias( "__loader__", "__spec__", "__annotations__", + "__annotate__", "__path__", # mypy adds __path__ to packages, but C packages don't have it "__getattr__", # resulting behaviour might be typed explicitly # Created by `warnings.warn`, does not make much sense to have in stubs: @@ -1510,6 +1511,9 @@ def verify_typealias( # Special attributes "__dict__", "__annotations__", + "__annotate__", + "__annotations_cache__", + "__annotate_func__", "__text_signature__", "__weakref__", "__hash__", @@ -1518,6 +1522,7 @@ def verify_typealias( "__vectorcalloffset__", # undocumented implementation detail of the vectorcall protocol "__firstlineno__", "__static_attributes__", + "__classdictcell__", # isinstance/issubclass hooks that type-checkers don't usually care about "__instancecheck__", "__subclasshook__",