Skip to content
Prev Previous commit
Next Next commit
add a note
  • Loading branch information
tungol committed Dec 6, 2024
commit ac02dd59087672ef6ff023c425d0bd3b8cccca2e
2 changes: 2 additions & 0 deletions mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,8 @@ def safe_inspect_signature(
# self parameter.
runtime_objclass = None
if runtime.__objclass__ is object:
# When __objclass__ is object, use the object_path to look up
# the actual class that this __init__ method came from.
if object_path:
module_name = ".".join(object_path[:-2])
module = silent_import_module(module_name)
Expand Down