You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add mypy as a required CI check, gated against a committed baseline so it fails only on new type errors -- not the existing 235 (see #429 for the measured breakdown). Same pattern as `tests/dead_key_audit.py`.
🛠️ Implementation
`tests/mypy_audit.py`: runs `mypy gitgalaxy/ --ignore-missing-imports`, parses output into `{file}:{line}: {code}` keys, diffs against a committed `tests/mypy_audit_baseline.json`.
Baseline entries no longer reproduced should be reported as FYI (encourage shrinking the baseline in the same PR that fixes them), mirroring `dead_key_audit.py`'s `run_ci_check()`.
New workflow (or a job in an existing one) running `python tests/mypy_audit.py --ci`.
Baseline keys include line numbers, so unrelated edits elsewhere in a file can shift them and produce spurious "new" errors needing a baseline refresh, even when nothing type-relevant changed. This is a standard, accepted tradeoff for line-based mypy baselining (not a bug) -- document it in the script's docstring like dead_key_audit.py's own "SCOPE & LIMITATIONS" section.
🎯 Objective
Add mypy as a required CI check, gated against a committed baseline so it fails only on new type errors -- not the existing 235 (see #429 for the measured breakdown). Same pattern as `tests/dead_key_audit.py`.
🛠️ Implementation
Known limitation to document
Baseline keys include line numbers, so unrelated edits elsewhere in a file can shift them and produce spurious "new" errors needing a baseline refresh, even when nothing type-relevant changed. This is a standard, accepted tradeoff for line-based mypy baselining (not a bug) -- document it in the script's docstring like dead_key_audit.py's own "SCOPE & LIMITATIONS" section.
Parent: #429