-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Descriptors and ClassVars #14969
Labels
Comments
AlexWaygood
added
the
topic-descriptors
Properties, class vs. instance attributes
label
Mar 28, 2023
Hello! I would like to work on this issue can you please assign it to me? |
@lhanekamp feel free to take this issue :) If you have any questions, please feel free to ask them here! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug Report
Have came across this issue from pyright
To Reproduce
Expected Behavior
Copied @erictraut comment:
ClassVar should work fine. If the class variable is assigned a descriptor, then the class variable will not be overwritten if you set the same attribute at the object level. So it sounds like mypy has a bug here. Pyright had a similar bug, which I recently fixed. Please report the bug to the maintainers of mypy.
Actual Behavior
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: