Switch Python linting and formatting to Ruff#2310
Switch Python linting and formatting to Ruff#2310KristopherKubicki wants to merge 1 commit intostagingfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 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 |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| format: | ||
| uv run black . | ||
| prettier --write app/static/js/**/*.js app/static/css/**/*.css | ||
| uv run ruff format . | ||
| prettier --write app/static/js/**/*.js app/static/css/**/*.css |
There was a problem hiding this comment.
Restore tabs in Makefile recipes for format/lint
The format and lint targets now use space indentation for their commands instead of tabs (uv run ruff… lines), so GNU Make treats those lines as malformed and exits with *** missing separator. Running make format or make lint currently fails before any Ruff tooling runs. Replacing the leading spaces with tabs (as still used by the test target below) restores working developer workflows.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the Python linting and formatting toolchain by replacing Black, Flake8, and isort with Ruff, consolidating three tools into one faster alternative. The migration updates all configuration files, developer documentation, CI workflows, and removes obsolete dependencies.
Key Changes:
- Replaces Black, Flake8, and isort with Ruff for Python code formatting and linting
- Updates pre-commit hooks to use
ruff formatandruff checkcommands - Refreshes developer documentation and agent guidance files to reference the new tooling
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Removes black, flake8, pycodestyle, pyflakes packages; retains mccabe and isort as transitive pylint dependencies |
| pyproject.toml | Removes [tool.black] and [tool.isort] sections; adds [tool.ruff.format] and [tool.ruff.lint] configuration; removes old tools from dev dependencies |
| .pre-commit-config.yaml | Replaces isort, black, and flake8 hooks with ruff-format and ruff check hooks |
| .flake8 | Deletes obsolete Flake8 configuration file |
| Makefile | Updates format and lint targets to use ruff commands (contains critical indentation bug) |
| .github/workflows/release-packages.yml | Replaces flake8 lint steps with ruff format and check commands |
| README.md | Updates development instructions to reference ruff commands |
| docs/testing.md | Changes linting instructions from flake8 to ruff |
| docs/developer_guide.md | Updates test instructions to use ruff; removes stray command line |
| docs/ci_checks.md | Updates CI documentation to reflect Ruff usage |
| AGENTS.md | Updates agent guidance to reference ruff format and ruff check |
| app/AGENTS.md | Changes formatting reference from black to ruff format |
| tests/AGENTS.md | Updates pre-commit command reference to ruff check |
| app/routes.py | Changes noqa comment from flake8 to ruff format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| uv run ruff format . | ||
| prettier --write app/static/js/**/*.js app/static/css/**/*.css |
There was a problem hiding this comment.
Makefile recipes must be indented with tabs, not spaces. Lines 4, 5, 8, 11, 12, 13, and 25 use spaces, which will cause Make to fail with an error like "*** missing separator". Replace the space indentation with tabs for all recipe lines.
| prettier --write app/static/js/**/*.js app/static/css/**/*.css | ||
|
|
||
| format-yaml: | ||
| prettier --write '*.yml' |
There was a problem hiding this comment.
Makefile recipe must be indented with a tab, not spaces. Replace the space indentation with a tab.
| prettier --write '*.yml' | |
| prettier --write '*.yml' |
| uv run ruff format --check . | ||
| uv run ruff check . | ||
| eslint 'app/static/js/**/*.js' |
There was a problem hiding this comment.
Makefile recipes must be indented with tabs, not spaces. Replace the space indentation with tabs for all three recipe lines.
|
Stale pull request message |
Summary
ruff format/ruff check.flake8configuration so dependency metadata matches the new toolchainTesting
Codex Task