-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Generic method signature doesn't resolve properly on a protocol classmethod #11115
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
Labels
bug
mypy got something wrong
Comments
I found the origin of this bug and a way to fix it, but I need more type to write a proper test (I would appreciate if someone experienced pointed me to a place where this test should be placed)
|
nullie
added a commit
to nullie/mypy
that referenced
this issue
Sep 16, 2021
97littleleaf11
pushed a commit
that referenced
this issue
Nov 19, 2021
Closes #11115. Correctly handle cls in generic classmethods of protocol. This should correctly handle cls in classmethods. Current behavior of not passing is_classmethod seems like an omission in implementation, so this should only correct buggy behavior and shouldn't break something else. Adds a test case `testSelfTypeProtocolClassmethodMatch`.
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
Closes python#11115. Correctly handle cls in generic classmethods of protocol. This should correctly handle cls in classmethods. Current behavior of not passing is_classmethod seems like an omission in implementation, so this should only correct buggy behavior and shouldn't break something else. Adds a test case `testSelfTypeProtocolClassmethodMatch`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Generic type signature doesn't seem to resolve properly on a protocol classmethod
To Reproduce
Expected Behavior
No errors
Actual Behavior
Your Environment
mypy.ini
(and other config files): no configurationThe text was updated successfully, but these errors were encountered: