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 0b5a92d commit a3a03aaCopy full SHA for a3a03aa
mypy/stubtest.py
@@ -269,11 +269,14 @@ 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, MISSING)
+ except Exception:
+ # Catch all exceptions in case the runtime raises an unexpected exception
+ # from __getattr__ or similar.
277
+ pass
278
+ else:
279
+ yield from verify(stub_to_verify, runtime_attr, object_path + [entry])
280
281
282
def _verify_static_class_methods(
0 commit comments