-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Unused section warning with warn_unused_configs and cache #5957
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 see this on 0.700 as well. passing
is definitely doing something. |
I'm getting the same problem with 0.701 with these lines in
They're definitely working, but I still get the Though, oddly enough, I'm doing this in two different projects but only getting this problem in one of them. I haven't had time to do further debugging. |
Increasing priority since this seems to affect quite a few people. I think that I've seen this myself as well. |
I can do this. Or we can mark it "easy first issue"? |
I suspect that this might be a bit difficult for a first issue, at least without a few hints. |
I can do a simple version of this: ignore the flag when in incremental mode (which is the default). I'm not sure I'm up to fixing it the way we fixed warn_redundant_casts / warn_unused_ignores. |
(In incremental mode it doesn't work right, and it isn't worth fixing.) Fixes #5957
(In incremental mode it doesn't work right, and it isn't worth fixing.) Fixes python#5957
With mypy 0.641 or the latest git master, and a config file like:
checking a file like
suppresses the
error: No library stub file for standard library module 'bdb'
error as expected.However, when running mypy a second time, I assume results are retrieved from its cache, and it shows:
which means I can only use
--warn-unused-configs
selectively (like after editing the config), as otherwise, I'd get a lot of bogus warnings in day-to-day usage.This is probably somewhat similar to #2960, which is the same kind of issue for
--warn-unused-ignores
.The text was updated successfully, but these errors were encountered: