-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
mypy incremental issues with --warn-unused-ignores
#2960
Comments
I think what happens here is that the data for I don't believe there's a bug to be fixed here (or at least I would prefer not to have to serialize the |
Hmm. Our model for how we use mypy is that we want to run it as part of our linter suite, along with pyflakes and friends (with the caching, it's basically fast enough). And the easy thing to do there is to just pass the But if we do that, then suddenly this flag doesn't work at all, unless you know to delete the mypy cache each time you want to run it. So I guess my vote is for updating the cache to include that map. |
I hear you -- but supporting this use case is a low priority for us. |
I've been able to work around this for CI by making sure mypy_cache is deleted between runs. |
--warn-unused-ignores
--warn-unused-ignores
I am deep in a rabbit hole of trying to understand if there are going to be any unexpected ramifications to a change to the handling of
They both fail in stage 2 with spurious unused type:ignore warnings. |
We may want to address this somehow (perhaps just by disallowing the combination for now) before making incremental the default mode per #4800. |
The snag here also does not actually seem to be that we don't write out the ignore errors map (which I think is fine), but that we don't generate error messages for failed imports from modules that are loaded from the cache initially but then later parsed due to changes in their dependencies. |
Good point, I had forgotten about this. I've encountered myself. This may affect a non-trivial number of users. |
So what's the action item here?
|
We have to figure out what's the best way to get rid of these bogus messages -- either fix the underlying issue or disable the flag in incremental mode. I haven't spent enough time thinking about this to say how hard this would be to fix. If somebody has spare cycles to look at this, great. Otherwise I can probably look at this next week or so. |
I can take this. I have a half-finished refactor of the production of import diagnostics that should make both this and #4798 easy to fix |
As a user I'd prefer the flag to not be disabled because it helps keep a
project clean without having different test code paths for ci and local dev
…On Tue, Mar 27, 2018, 4:28 PM Michael J. Sullivan ***@***.***> wrote:
I can take this. I have a half-finished refactor of the production of
import diagnostics that should make both this and #4798
<#4798> easy to fix
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2960 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAA5NGBk0eDHjxIkyMTKRoExNP1UE0IQks5tiqDYgaJpZM4MTQX0>
.
|
This is accomplished by generating diagnostics for suppressed dependencies before generating unused ignore notes. This requires that we store line information for suppressed dependencies in our cache files. Fixes #2960.
This is accomplished by generating diagnostics for suppressed dependencies before generating unused ignore notes. This requires that we store line information for suppressed dependencies in our cache files. Fixes #2960.
This is accomplished by generating diagnostics for suppressed dependencies before generating unused ignore notes. This requires that we store line information for suppressed dependencies in our cache files. Fixes #2960
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily.
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily.
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
There is a problem with MyPy's implementation of --warn-unused-ignore flag, that depending on it's incremental or full run it will sometimes throw an "unused ignore" error (entirely randomly it seems). The problem is described (but only workarounded) in python/mypy#2960. The workaround is to disable --warn-unused-ignore flag. There is little harm in having unused ignores and we can clean them up from time to time easily. GitOrigin-RevId: d93c1fdb26aba280d907ef431bae6c9984155a9c
I just had the following sequence happen, which suggests to me that the mypy cache is broken with this option:
The text was updated successfully, but these errors were encountered: