Skip to content

fix --install-types not tracking stubs when ignore_missing_imports is set#21111

Open
knQzx wants to merge 2 commits intopython:masterfrom
knQzx:fix/install-types-ignored-imports
Open

fix --install-types not tracking stubs when ignore_missing_imports is set#21111
knQzx wants to merge 2 commits intopython:masterfrom
knQzx:fix/install-types-ignored-imports

Conversation

@knQzx
Copy link
Copy Markdown

@knQzx knQzx commented Mar 30, 2026

when ignore_missing_imports is enabled, --install-types silently skips recording approved stub packages since the error reporting path is bypassed entirely. this means running mypy --install-types won't install stubs like types-Pygments even though mypy knows about them.

this adds tracking of missing stub packages even when import errors are suppressed, so --install-types can still pick them up.

fixes #21068

@github-actions
Copy link
Copy Markdown
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.

Mypy suggests types-Pygments but --install-types doesn't install it

1 participant