Skip to content

Distinguish not found vs skipped modules#20812

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-skip
Feb 16, 2026
Merged

Distinguish not found vs skipped modules#20812
ilevkivskyi merged 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. ✅

@ilevkivskyi ilevkivskyi merged commit c2b60a8 into python:master Feb 16, 2026
24 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-skip branch February 16, 2026 17:39
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

2 participants

Comments