Skip to content

stubtest: get better signatures for __init__ of C classes #18259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
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
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy