mechababs has no [tool.ruff] config and no CI workflows, so formatting is unenforced and drifting. ruff format --check currently reports 17 files would be reformatted, 3 already formatted. (ruff check . passes clean — this is purely formatting.)
Now that the repo takes outside contributions, unenforced formatting is a contributor-facing papercut rather than just an internal one: a PR gets reformatted incidentally, or a reviewer spends the round-trip on it.
Do it as one deliberate pass
Not piecemeal. Running ruff format on individual files as you touch them rewrites unrelated lines into an otherwise small diff — that has already happened once here, where a test-file rename commit also carried a wholesale reformat of that file, making the rename unreviewable.
Scope
Pin the ruff version in CI rather than pip install ruff — an unpinned install silently changes the rule set on someone else's PR (this bit babs: PennLINC/babs#397).
mechababs has no
[tool.ruff]config and no CI workflows, so formatting is unenforced and drifting.ruff format --checkcurrently reports 17 files would be reformatted, 3 already formatted. (ruff check .passes clean — this is purely formatting.)Now that the repo takes outside contributions, unenforced formatting is a contributor-facing papercut rather than just an internal one: a PR gets reformatted incidentally, or a reviewer spends the round-trip on it.
Do it as one deliberate pass
Not piecemeal. Running
ruff formaton individual files as you touch them rewrites unrelated lines into an otherwise small diff — that has already happened once here, where a test-file rename commit also carried a wholesale reformat of that file, making the rename unreviewable.Scope
[tool.ruff]topyproject.toml.ruff formatcommit, separate from any behaviour change.ruff check .andruff format --check .. These are two separate steps;ruff checkalone does not catch formatting.Pin the ruff version in CI rather than
pip install ruff— an unpinned install silently changes the rule set on someone else's PR (this bit babs:PennLINC/babs#397).