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 f445369 commit 73804f3Copy full SHA for 73804f3
mypy/stubtest.py
@@ -568,6 +568,13 @@ def verify_typeinfo(
568
# Catch all exceptions in case the runtime raises an unexpected exception
569
# from __getattr__ or similar.
570
continue
571
+
572
+ # If it came from the metaclass, consider the runtime_attr to be MISSING
573
+ # for a more accurate message
574
+ if runtime_attr is not MISSING and type(runtime) != runtime:
575
+ if getattr(runtime_attr, "__objclass__", None) is type(runtime):
576
+ runtime_attr = MISSING
577
578
# Do not error for an object missing from the stub
579
# If the runtime object is a types.WrapperDescriptorType object
580
# and has a non-special dunder name.
0 commit comments