Skip to content

Distinguish not found vs skipped modules#20812

Open
ilevkivskyi wants to merge 1 commit intopython:masterfrom
ilevkivskyi:fix-skip
Open

Distinguish not found vs skipped modules#20812
ilevkivskyi wants to merge 1 commit intopython:masterfrom
ilevkivskyi:fix-skip

Conversation

@ilevkivskyi
Copy link
Member

Fixes #20800

We need to distinguish not found modules from skipped modules, because these have a different effect in the caller (unless we are using --ignore-missing-imports).

I didn't really think about the daemon, I simply fall back to the old semantics (everything is not found) so there should be no change for the daemon, I added a TODO.

Implementation is straightforward: I record the suppression reason as part of the suppression hash. I also fix a stupid bug I added earlier when I mutate a list I am iterating over.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--follow-imports=skip is broken in incremental mode when modules are not in root sources

1 participant