-
-
Notifications
You must be signed in to change notification settings - Fork 269
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 ruff #922
Upgrade ruff #922
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #922 +/- ##
==========================================
+ Coverage 97.33% 97.39% +0.05%
==========================================
Files 42 55 +13
Lines 2104 2341 +237
==========================================
+ Hits 2048 2280 +232
- Misses 56 61 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Good to me ! Beware of black versioning, using an open bounds can leads to formatting and CI breakage the day a version with updated rules is published.
pyproject.toml
Outdated
@@ -58,9 +59,9 @@ pytest-regressions = "^2.4.0" | |||
pytest-freezer = "^0.4.6" | |||
pytest-xdist = "^3.1.0" | |||
# code formatter | |||
black = ">=22.10,<24.0" | |||
black = ">=22.10" |
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.
You should keep pre-commit
version in sync: https://github.com/commitizen-tools/commitizen/blob/master/.pre-commit-config.yaml#L36
Maybe rely on ~=
notation to avoid silent black update (or the opposite, not updated because already present in earlier version) with formatting changes in both: black~=23.11
in pre-commit
and black = "~=22.10"
in pyproject
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.
good point! let me update it to black~=23.11 on both sides
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.
Note: I have been deploying this on my repositories lately: https://github.com/GabDug/sync-pre-commit-lock
It's a game changer: it update pre-commit hooks and keep them in sync when locking using poetry
(I use it with pdm
but same behavior)
This indeed looks cool! How do you feel about |
I am a Note that I am currently working with a |
Sounds cool! Will try it in my next project and see how it works 👀 |
Description
ruff format
closes: #915
Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
Steps to Test This Pull Request
Additional context