Background
The CI workflow runs ruff check src/, but the workflow only triggered on branches: [main] while the repo's default branch is master — so the lint had never actually run. Enabling CI (PR #6) surfaced a backlog of ~356 pre-existing, repo-wide style findings. To avoid gating unrelated work, the ruff step was made advisory (continue-on-error: true) in PR #6.
This issue tracks clearing that backlog and restoring ruff as a blocking check.
Breakdown (at time of filing)
Total: 356 findings. None are real bugs (F/pyflakes is clean; tools/audit.py is clean). Dominant rules:
| Rule |
Count |
What |
UP045 |
216 |
Optional[X] → `X |
E501 |
56 |
line too long |
W293 |
38 |
whitespace on blank line |
UP006 |
10 |
List/Tuple → list/tuple |
E701 |
8 |
multiple statements on one line |
UP035/UP037/UP024/UP015 |
~15 |
misc pyupgrade |
I001 |
5 |
import sorting |
E402 |
4 |
module import not at top |
N818 |
2 |
exception not named *Error (VaultLocked, MatterRequired) |
E741 |
1 |
ambiguous variable name |
Most-affected files: models.py (103), cli.py, downloader.py (36), docket_types.py (15), courts.py (13), selection.py (11).
Suggested plan
ruff check src/ --fix for the ~280 auto-fixable findings; review --unsafe-fixes separately.
- Hand-fix the rest (
N818 renames, E701/E741, any remaining E501).
- Run the full test suite +
tools/audit.py to confirm no behavior change.
- Remove
continue-on-error: true from the "Lint with ruff" step in .github/workflows/ci.yml so it blocks again.
Best done as its own PR so the reformat doesn't mix with feature work.
https://claude.ai/code/session_01NNvhsYRVWhjfcdgaSmU5bt
Background
The CI workflow runs
ruff check src/, but the workflow only triggered onbranches: [main]while the repo's default branch ismaster— so the lint had never actually run. Enabling CI (PR #6) surfaced a backlog of ~356 pre-existing, repo-wide style findings. To avoid gating unrelated work, the ruff step was made advisory (continue-on-error: true) in PR #6.This issue tracks clearing that backlog and restoring ruff as a blocking check.
Breakdown (at time of filing)
Total: 356 findings. None are real bugs (
F/pyflakes is clean;tools/audit.pyis clean). Dominant rules:UP045Optional[X]→ `XE501W293UP006List/Tuple→list/tupleE701UP035/UP037/UP024/UP015I001E402N818*Error(VaultLocked,MatterRequired)E741Most-affected files:
models.py(103),cli.py,downloader.py(36),docket_types.py(15),courts.py(13),selection.py(11).Suggested plan
ruff check src/ --fixfor the ~280 auto-fixable findings; review--unsafe-fixesseparately.N818renames,E701/E741, any remainingE501).tools/audit.pyto confirm no behavior change.continue-on-error: truefrom the "Lint with ruff" step in.github/workflows/ci.ymlso it blocks again.Best done as its own PR so the reformat doesn't mix with feature work.
https://claude.ai/code/session_01NNvhsYRVWhjfcdgaSmU5bt