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
{{ message }}
Repository navigation
build/CI: ruff format drift not gated for pysimlin #664
The pysimlin pre-commit / CI gate runs ruff check only, not ruff format --check. As a result Python format drift accumulates undetected. Running ruff format --check currently flags at least:
src/pysimlin/simlin/_ffi_build.py
src/pysimlin/simlin/sim.py
ruff check (the linter) does not enforce formatting, so a file that is lint-clean but not ruff format-clean passes the gate.
Why it matters
Build hygiene / developer experience: format-dirty Python files merge silently, then unrelated PRs pick up noisy reformatting diffs (or reviewers flag formatting the tooling should have caught). The repo already intends ruff format to be the Python formatter; nothing verifies it on commit or in CI.
This is the Python analogue of #627 (no prettier --check gate for TypeScript). #627 is explicitly TypeScript-only and does not cover Python/ruff.
Suggested resolution
Two parts, ordering matters (clean up first, then gate, or the gate's first run is noisy):
One-time ruff format sweep to clear existing drift (the two files above), as its own commit so the formatting churn is isolated.
Add ruff format --check to the pysimlin pre-commit step and CI, mirroring how Rust cargo fmt -- --check is already enforced.
Components affected
scripts/pre-commit (Python bindings step)
.github/workflows/ (CI)
src/pysimlin/
Severity
Low (build hygiene).
Discovery context
Identified during an LTM-hardening session while running the pysimlin gate manually.
Activity