-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Enforce error codes on type: ignores #10718
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
Labels
Comments
I don't think you linked a PR that adds this command line argument. Could you double check? Reopening. |
It's #11633 |
Whoops, my bad. Thanks @JelleZijlstra! |
Ah, thanks! Update: Realized it's |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature
As far as I know, there's no way to enforce an error code is added to the end of a type ignore. Since error codes can narrow the type errors ignored on a specific line, it would be useful to ensure all # type: ignores in a codebase included an error code, to avoid silencing additional errors or disabling otherwise valid typechecking on a line.
The feature could be a config option
--enforce-error-codes
that verifies all type: ignores specify an error code.The text was updated successfully, but these errors were encountered: