-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Types of class member variables are not checked #2243
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
Comments
Try adding |
Works great – thanks for the pointer! Is the behaviour you describe intentional? Wasn't able to find anywhere where this was discussed. |
It's described in the documentation: https://mypy.readthedocs.io/en/latest/basics.html (maybe we should make the wording somehow more explicit, as users commonly miss this point). |
I've added a section on this to common_issues.html. |
Running mypy on the following class, using Python 3.6 support (PEP 526):
Results in the following output:
It seems as if the type of the member variable
b
is not checked.The text was updated successfully, but these errors were encountered: