-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Disable specific checks #3806
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
I don't think this is currently possible, and I think the feature request is effectively what's described in the comment on #3507 -- a "loose mode" that tries hard to never issue any error on non-annotated code. |
Well, that's may be not enough. For example, my code is annotated and checked by PyCharm, which report no errors. Trying to run mypy on this code yields a lot of errors that may seem false-positive to me (but no to the other users). I'd also like the ability to turn off a check temporarily if there is a bug in this check. So something more flexible than just not reporting errors in a not typed code is needed. |
PyCharm and Mypy have different levels of strictness in many things such as untyped collections and Unions, Pycharm is in general less strict (which is good for an IDE, less so for a tool meant to find bugs in programs). Also, have you used
I don't think Carl meant that, and if you read #3507, you will see that the proposed solution |
I think it was already proposed to assign a unique number for every error message (like in flake8), but I can't fund an issue (maybe this was on gitter). I think this is a reasonable feature request, but rather low priority at the moment, since mypy is still in alpha stage and many things can change. |
Implementing unique error codes for every error message is probably too big of a change to happen in the near future. A "loose" mode would be more promising as a shorter-term fix to the issue, as discussed in #3507. I've been thinking about such a mode for a long time (at one point it was called the "weak" mode) but nobody has had time to implement it properly. |
Well we have done the error codes thing sort of. Closing in favor of #7599. |
Hello!
I've tried to run mypy on my project and I've got, among others, lots of 'Need type annotation for variable' errors. Since I'm not quiet ready to annotate all of those, I'd like to disable this kind of errors. Any way to do it? If no, let this issue be a feature request.
The text was updated successfully, but these errors were encountered: