Add --warn-unused-strictness-exceptions flag#4225
Add --warn-unused-strictness-exceptions flag#4225ilinum wants to merge 1 commit intopython:masterfrom
Conversation
|
The tests that this PR is failing were introduced in #3952. It's definitely a bug in @ilevkivskyi I looked at #3952 but I'm having trouble figuring it out on how to fix this particular problem. Can you give me some pointers? |
|
I would recommend the first option, unless @JukkaL has a better idea. |
Warn about strictness flags unnecessarily disabled for particular modules. If a flag is enabled globally (either explicitly or by default) and it is disabled for a particular module that does not have errors related to this flag mypy will output an error. Currently, this is implemented only for --disallow-any-generics but it should be very straightforward to support other strictness flags. Fixes python#4018
c719fa6 to
4a364ca
Compare
|
Hey @ilinum shall we abandon this? Or do you have time to bring it back into shape? |
|
No, I don't think I have enough time to work on this. If someone wants to take this over, go ahead! |
Warn about strictness flags unnecessarily disabled for particular modules.
If a flag is enabled globally (either explicitly or by default) and it is
disabled for a particular module that does not have errors related to this
flag mypy will output an error.
Currently, this is implemented only for --disallow-any-generics but it should be
very straightforward to support other strictness flags.
Fixes #4018