-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
false positive on interaction between @property
, @lru_cache
, and inheritance
#16855
Labels
bug
mypy got something wrong
Comments
Thanks, looks easy enough to fix #16856 |
Amazingly quick. Thanks again! |
hauntsaninja
added a commit
to hauntsaninja/mypy
that referenced
this issue
Feb 2, 2024
hauntsaninja
added a commit
that referenced
this issue
Mar 1, 2024
I went ahead and merged my PR, but note there's a (pre-existing) false negative: #16857 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
My thanks to @hauntsaninja for their excellent work on #5858! However, I suspect there's a related issue with the combination of
@lru_cache
and@property
where inheritance is at play:To Reproduce
Gists:
mypy-play.net
pyright-play.net (pyright handles this correctly, IMO)
Expected Behavior
The tool should accept the code without comment.
Actual Behavior
The tool believes the type of the inherited
@property
is incompatible with the definition in the base class.Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: