ci: speedup type checking - #5982
Merged
Merged
Conversation
Declare third-party stubs in a dedicated `typing` dependency group locked in uv.lock, and add it to default-groups. check_types.py now runs a single deterministic mypy pass via `uv run --group typing`, and on failure reads mypy's `.mypy_cache/missing_stubs` to print the exact `uv add` command for any stubs that still need declaring. This drops the pip + `--install-types` forward pass that doubled runtime. Co-Authored-By: Claude <noreply@anthropic.com>
Bobronium
force-pushed
the
arseny/cache-mypy-on-ci
branch
from
June 10, 2026 00:44
d5c7c3b to
aa249d4
Compare
Bobronium
marked this pull request as ready for review
June 10, 2026 01:21
theomonnom
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This speeds up mypy from 2m 42s to just 3s with cache (whole job succeeds in 30 seconds instead of 3.5 minutes).
Changes
typingdependency groupscripts/check_types.pyto recognize missing typing dependencies from a single run and suggest adding themRunning
scripts/check_types.pywith missing dependencies will now produce: