chore: faster and stricter mypy - #2968
Open
henryiii wants to merge 2 commits into
Open
Conversation
This makes mypy around 26% faster from a cold cache. Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Turn on possibly-undefined, exhaustive-match, and other strict flags, and fix what they report. Two real bugs: pyodide never set `repaired_wheel` when it reused a compatible wheel, so the test step failed with a NameError; the OCI shell read loop spun forever if the shell exited. Assisted-by: ClaudeCode:claude-opus-5
henryiii
requested review from
agriyakhetarpal,
freakboy3742,
hoodmane and
ryanking13
as code owners
August 13, 2026 05:05
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.
I'm not sure it's possible to reuse a wheel in pyodide, but it was a logical bug anyway.
馃 AI text below 馃
Two mypy changes:
native_parser = true, which makes mypy about 26% faster from a cold cache.possibly-undefinedandexhaustive-match, plus fixes for everything they report.Two of the fixes are real bugs:
built_wheelinstead ofrepaired_wheelwhen it reused a compatible wheel, so the test step failed with aNameError.bashlexhas no stubs, sono-any-unimportedis disabled forcibuildwheel.bashlex_evalonly.