-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Feature
I thought this might be supported, but could not find it in the docs or --help
. I also couldn't find this request as a closed or open issue; apologies if this has been discussed.
I believe it would be beneficial for mypy to have a --disable-ignores
flag or similar.
The flag would simply ignore all code decorated with # type: ignore*
or similar.
Pitch
This would simplify auditing and managing legacy code.
Often times, errors are suppressed because mypy does not yet have a relevant feature or the developer's codebase requires too much refactoring. This is somewhat similar to the current support for unused ignores, but would help developers catch situations where slight edits to code might make it conformant to mypy.
Periodically disable all ignores for an audit is an important part of maintaining code health. Bringing this functionality into mypy would be much easier than running mypy on a version of the code with the ignores stripped.