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 378119f commit 73d2584Copy full SHA for 73d2584
mypy/stubtest.py
@@ -269,11 +269,13 @@ def verify_typeinfo(
269
mangled_entry = "_{}{}".format(stub.name, entry)
270
stub_to_verify = next((t.names[entry].node for t in stub.mro if entry in t.names), MISSING)
271
assert stub_to_verify is not None
272
- yield from verify(
273
- stub_to_verify,
274
- getattr(runtime, mangled_entry, MISSING),
275
- object_path + [entry],
276
- )
+ try:
+ runtime_attr = getattr(runtime, mangled_entry)
+ except Exception:
+ # Catch all exceptions in case the runtime raises an unexpected exception from __getattr__ or
+ # similar.
277
+ runtime_attr = MISSING
278
+ yield from verify(stub_to_verify, runtime_attr, object_path + [entry])
279
280
281
def _verify_static_class_methods(
0 commit comments