-
Notifications
You must be signed in to change notification settings - Fork 31
🔨Upgrade pre-commit hooks and replace some with Ruff #8716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔨Upgrade pre-commit hooks and replace some with Ruff #8716
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8716 +/- ##
==========================================
+ Coverage 87.47% 89.32% +1.84%
==========================================
Files 2018 1712 -306
Lines 79384 68498 -10886
Branches 1389 646 -743
==========================================
- Hits 69444 61183 -8261
+ Misses 9545 7146 -2399
+ Partials 395 169 -226
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
🧪 CI InsightsHere's what we observed from your CI run for 998db0d. ✅ Passed Jobs With Interesting Signals
|
d541fb2 to
49d36a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the Python tooling setup by migrating from Black to Ruff as the primary code formatter and linter. Ruff is a faster, all-in-one tool that combines the functionality of multiple tools (Black, isort, pyupgrade, pycln, flake8).
- Replaces Black with Ruff for code formatting across the repository
- Consolidates pre-commit hooks by removing redundant tools (pyupgrade, pycln, isort, Black)
- Updates configuration files and documentation to reflect the tooling change
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.ruff.toml |
Expanded configuration with formatting rules, exclusions, and linting options that replace Black/isort settings |
.pre-commit-config.yaml |
Added Ruff hooks and removed deprecated tooling (Black, isort, pyupgrade, pycln) |
.isort.cfg |
Removed as isort functionality is now handled by Ruff |
.flake8 |
Removed as flake8 functionality is now handled by Ruff |
README.md |
Updated badge from Black to Ruff |
CONTRIBUTING.md |
Updated documentation to reference Ruff instead of Black |
docs/coding-conventions.md |
Updated coding guidelines to mention Ruff instead of Black |
.github/instructions/python.instructions.md |
Updated instructions to use Ruff for formatting |
.vscode/settings.template.json |
Configured Ruff as default Python formatter with format-on-save |
.vscode/launch.template.json |
Removed redundant comments |
.vscode/extensions.json |
Removed Black formatter extension, kept trailing comma |
packages/models-library/Makefile |
Changed from black to ruff format command |
packages/service-integration/Makefile |
Changed from black to ruff format command |
scripts/openapi/openapi_python_server_codegen.sh |
Fixed shebang typo |
services/web/server/docker/healthcheck.py |
Minor code improvements: added HTTP_OK constant and noqa comment |
services/web/server/tests/data/server_docker_prod_app_config-unit.json |
Removed trailing comma from JSON |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all right let's see how this behaves
|
@mergify queue |
🟠 Waiting for conditions to matchDetails
|
Merge Queue Status🟠 Waiting for queue conditions Required conditions to enter a queue
|
9070d64 to
998db0d
Compare
|



What do these changes do?
replace pre-commit hooks such as black, pyupgrade, isort and pycln by ruff.
speed increase while pre-commiting, and removing weird jumps between black and ruff.
also added the format on save behavior since it is very fast.
Related issue/s
How to test
Dev-ops