-
-
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
mypy doesn't complain about wrong attribute access in unannotated method #1514
Labels
Comments
The default behavior is as intended, but it looks like the flag may be |
Yes, that's a good idea. After all that's the type given to self when there |
msullivan
added a commit
that referenced
this issue
Sep 19, 2019
) This is accomplished by updating the helper that constructs a callable type from a func def to fill in the self argument. Also suppress errors about `need type annotation` in most cases in a checked but untyped method. This will make check_untyped_defs a lot more useful. Closes #7309, #5401, #4637, #1514
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this code:
mypy complains about
method2
andmethod3
, but notmethod1
:Now looking at #1415 I thought adding
--check-untyped-defs
would help ("type check the interior of functions without type annotations"), but the output doesn't change with that argument. Am I missing something?The text was updated successfully, but these errors were encountered: