chore: enforce repo-wide Ruff checks in CI - #12
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
WalkthroughThis PR modernizes type hints to Python 3.10+ syntax (replacing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR enables repository-wide
ruff check .enforcement in CI and removes the existing Ruff violations that were preventing that from being a reliable quality gate.The original motivation came from review feedback: the SQLAlchemy-related files touched in the previous work were already Ruff-clean, but the repository as a whole still had outstanding lint findings. Instead of documenting that exception and leaving the gap in place, this change clears the backlog and makes Ruff part of the normal CI flow.
What changed
make linttarget so Ruff can be run consistently in local development and CImisetask for the same repository-wide lint commandImplementation notes
Most of the cleanup is mechanical and intended to make the codebase compatible with the currently configured Ruff rule set:
Todoentity implementation so it remains lint-clean without introducing ignore rulesWhile doing that cleanup, I also aligned a couple of HTTP error branches with the corresponding use case behavior so the route handler continues to return the expected
400responses for invalid lifecycle transitions.Why this approach
The alternative would have been to keep CI scoped to only a subset of files or to add temporary exclusions. That would preserve the existing gap and make future enforcement harder.
By fixing the current backlog now and turning on repository-wide Ruff checks in CI, we get a straightforward rule going forward: new changes should keep the entire repository lint-clean.
Impact
make lint/mise run lintentry pointValidation
make formatmake lintmake testSummary by CodeRabbit
Bug Fixes
Chores