Repository navigation
Wire mypy into CI as a baseline-gated regression check - #434
Merged
Merged
Conversation
Adds tests/mypy_audit.py, mirroring tests/dead_key_audit.py's already-
established pattern: run the real checker, diff against a committed
baseline, fail only on genuinely new hits so this doesn't block every
unrelated PR on day one.
Seeded the baseline with the 228 unique {file}:{line}:{code} errors
`mypy gitgalaxy/ --ignore-missing-imports` currently reports (235 raw
hits, collapsing to 228 unique keys -- 5 lines carry multiple distinct
errors of the same code; documented as a known, accepted limitation
in the module docstring rather than over-engineered around).
Verified: --ci reports clean against the freshly-generated baseline;
temporarily removing one baseline entry correctly flags exactly one
new error and exits 1; restoring it returns to a clean exit 0. Also
fixed .gitignore's blanket `*.json` rule silently blocking `git add`
on the new baseline file (same rule that would have blocked
dead_key_audit_baseline.json too, had it not predated the rule) --
added an explicit `!tests/*_baseline.json` carve-out.
Fixing the actual 228 errors is #431 (root-cause fan-out fixes),
#432 (core engine), and #433 (long tail) -- this PR only wires the gate.
| import subprocess | ||
| import sys | ||
| from pathlib import Path | ||
| from typing import Dict, List |
Contributor
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.
Summary
Part 1 of #429 (mypy type-safety epic; #431-#433 are the actual fix-up work). This PR only wires the gate.
Test plan