Clear the ruff backlog and re-block the lint in CI (closes #7)#11
Open
johnzfitch wants to merge 4 commits into
Open
Clear the ruff backlog and re-block the lint in CI (closes #7)#11johnzfitch wants to merge 4 commits into
johnzfitch wants to merge 4 commits into
Conversation
ruff check --fix across src/: Optional[X]->X|None (UP045), List/Tuple->list/ tuple (UP006), import sorting (I001), pyupgrade (UP024/UP035/UP037), and whitespace. No behavior change; 302 passed, 9 skipped.
- pcl.py: move .auth/.config/.models/.security imports above TypeVar (E402) - downloader.py: split one-line if-statements onto two lines (E701) - parser.py: rename ambiguous 'l' to 'ln' (E741) - security.py/vault.py: add # noqa: N818 to intentionally-named exceptions - cli.py: strip trailing/blank-line whitespace (W291/W293) https://claude.ai/code/session_01NNvhsYRVWhjfcdgaSmU5bt
Wrap all remaining long lines without changing runtime behavior or the line-length config (kept at 100). Breaks long function calls/defs at commas, long strings via implicit concatenation (content preserved), and long boolean/conditional expressions with parentheses. ruff check src/ now reports zero findings; pyflakes and tools/audit.py stay clean; pytest stays at 302 passed, 9 skipped. https://claude.ai/code/session_01NNvhsYRVWhjfcdgaSmU5bt
The ~360 pre-existing style findings are fixed (299 auto-fixes + manual line wraps to the existing 100-char limit, no line-length relaxation, no behavior change). Remove continue-on-error so ruff gates again. ruff check src/ is clean; 302 passed, 9 skipped; pyflakes + audit clean.
There was a problem hiding this comment.
Pull request overview
This PR clears the accumulated ruff lint backlog (primarily via safe auto-fixes and targeted manual formatting) and re-enables ruff check src/ as a blocking CI step now that the workflow triggers correctly on master.
Changes:
- Modernized type hints across
src/(e.g.,Optional[T]→T | None,List[T]→list[T],Iteratorfromcollections.abc) and applied import/whitespace cleanup. - Performed manual formatting fixes to satisfy lint rules (notably line wrapping to the existing 100-char limit).
- Restored CI enforcement by removing
continue-on-errorfrom the ruff lint step.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/pacer_cli/vault.py |
Updates optional type hints and suppresses N818 for VaultLocked. |
src/pacer_cli/selection.py |
Replaces legacy typing generics with built-in generics and union types. |
src/pacer_cli/security.py |
Modernizes typing/imports and applies minor formatting to satisfy lint rules. |
src/pacer_cli/reader.py |
Wraps long conditions/paths and normalizes exception types (OSError). |
src/pacer_cli/pcl.py |
Updates typing imports/order and optional type hints. |
src/pacer_cli/parser.py |
Minor import ordering and variable rename for lint compliance. |
src/pacer_cli/models.py |
Updates many model field annotations from Optional to ` |
src/pacer_cli/mcp_server.py |
Updates typing to modern unions and reformats long expressions. |
src/pacer_cli/errors.py |
Converts legacy typing generics and wraps long strings to line-length. |
src/pacer_cli/downloader.py |
Updates optional types, exception types, and wraps long log/regex lines. |
src/pacer_cli/docket_types.py |
Modernizes annotations and replaces inline conditional return with clearer flow. |
src/pacer_cli/courts.py |
Updates function return annotations and removes Optional usage. |
src/pacer_cli/config.py |
Updates config model annotations and wraps a long call site. |
src/pacer_cli/cli.py |
Updates optional types and applies formatting/import ordering fixes. |
src/pacer_cli/auth.py |
Updates optional type annotations to ` |
.github/workflows/ci.yml |
Makes ruff check src/ blocking again by removing continue-on-error. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #7.
CI's
ruff check src/had never actually run (the workflow only triggered onmainwhile the repo lives onmaster), so ~360 pre-existing style findings had accumulated unenforced. This clears them and restores ruff as a blocking check.What changed
ruff check --fix):Optional[X]→X | None(UP045),List/Tuple→list/tuple(UP006), import sorting (I001), assorted pyupgrade (UP024/UP035/UP037/UP015), and whitespace.E402/E701/E741and the long-lineE501wraps — wrapped to the existing 100-char limit (line-length was not relaxed), using hanging indents and implicit string concatenation. No# noqafor E501.continue-on-errorfrom the "Lint with ruff" CI step so it blocks again.No behavior change
This is style-only — no runtime logic was touched. Verified at each step:
ruff check src/→ All checks passed!pytest tests/→ 302 passed, 9 skippedpyflakes src/pacer_cli+python tools/audit.py→ cleanhttps://claude.ai/code/session_01NNvhsYRVWhjfcdgaSmU5bt
Generated by Claude Code