Skip to content

stubtest false positive for Protocol __init__ #12820

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

Closed
JelleZijlstra opened this issue May 20, 2022 · 0 comments · Fixed by #13179
Closed

stubtest false positive for Protocol __init__ #12820

JelleZijlstra opened this issue May 20, 2022 · 0 comments · Fixed by #13179
Labels

Comments

@JelleZijlstra
Copy link
Member

From python -m mypy.stubtest --custom-typeshed-dir . wsgiref:

error: wsgiref.types._Readable.__init__ is inconsistent, stub does not have *args argument "args"
Stub: at line 87
def (self: builtins.object)
Runtime: at line 1912 in file /Users/jelle/py/cpython/Lib/typing.py
def (self, *args, **kwargs)

The stub and implementation are exactly the same.

Stubtest picks up the __init__ method the runtime injects for Protocols, but it's not useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants