-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Ignore specific error codes from configuration file #9533
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
You can do it from the command line, e.g. IIUC you can do it from the config file too ( |
(Note this feature hasn't made it to a mypy release yet, so you'll need to install mypy from git master to do this) |
Alright, thanks for your answers. |
Keeping this open because it needs docs. |
Whoops, trying this with master, it looks like there's a bug in the code that reads this flag from mypy.ini.
The line in mypy.ini was
|
Installed a git checked out version of mypy to try this. The command-line way worked (for one or more error codes), but the config file way did not: Python 3.8.5 Just saw you found out already by yourself :) Trying to debug this myself, but in case somebody else does before me, I would be interested to know the cause of this. |
Probably something's needed to flag that config option as a list. I'd be grateful if you debugged this and came up with a fix! |
Working on it. |
@gvanrossum can I work on the documenting this thing?? |
Please do! |
I think we actually have documentation for this; both CLI and config are now documented. (But documentation can almost always be improved, so if you see improvements to be made, feel free to suggest them!) |
Please make it possible to ignore errors with arbitrary error codes, though the configuration file.
Essentially, make the # type: ignore[code, ...] behavior possible through the configuration file, as it would be
nice to have the ability to keep the code visually simpler, by moving these directives from comments, to the
config file.
The text was updated successfully, but these errors were encountered: