chore: faster and stricter mypy - #2968
Conversation
freakboy3742
left a comment
There was a problem hiding this comment.
I agree there's a potential endless loop on EOF; but as the test suite bears out, theres either a testing gap or different handling required.
Other than that, the changes all makes sense to me.
|
The other PRs are stuck in the 3-hour timeout. 🤖 AI text below 🤖 The test failure is an environment regression on the new GitHub runner images, not a behavior change from the EOF fix — the fix is what made it visible.
Before this change, that scenario busy-looped forever on EOF; now it errors immediately. Pushed a fix to the test: it queries |
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
Podman ignores its usual config files when CONTAINERS_CONF is set, so it
falls back to the first runtime found on PATH. On current GitHub Ubuntu
runner images that is crun 1.14.1, which cannot parse the OCI spec v1.2.x
config that podman 5.8.4 generates ("crun: unknown version specified").
Query the default runtime path and set it in the generated config.
Assisted-by: ClaudeCode:claude-fable-5
62459fe to
39324d0
Compare
mypy on macOS marks the rest of the function unreachable after the darwin pytest.skip, so the strict index error only appears on Linux. Assisted-by: ClaudeCode:claude-fable-5
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.