-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
super(cls, self) seemingly has no attribute it actually has #13497
Comments
Mypy has to implement quite a lot of special-casing in order to support |
This
already fails. |
This appears to have been fixed in mypy 0.990. It does not repro since that release. |
Wow, I never expected to see this one fixed |
Fixed by #13544. mypy will now get out of your way because of the hasattr |
Bug Report
I wanted to have a quick way of concatenating results of several mixin-like implementations of similar algorithms. Below is a MWE of what I wanted to implement
To Reproduce
MWE:
Expected Behavior
No warning
Actual Behavior
mypy recognizes
even though it is executed after
if hasattr(...)
What's even more strange, if you construct a similar pattern but with the method
foo
with no arguments, then the same example just passes mypy checks.Your Environment
The text was updated successfully, but these errors were encountered: