-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replace black
and pyproject.toml
with ruff format
and ruff.toml
#1188
Conversation
ruff.toml
black
and pyproject.toml
with ruff format
and ruff.toml
@@ -7,5 +7,4 @@ pytest-testmon==2.1.1 | |||
requests-mock==1.12.1 | |||
freezegun==1.5.1 | |||
|
|||
black==24.10.0 # Also update `.pre-commit-config.yaml` if this changes | |||
ruff==0.8.2 # Also update `.pre-commit-config.yaml` if this changes |
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.
while we're changing our formatter, is it worth updating to ruff 0.9.x? (which changes formatter rules slightly, including "Improved compatibility with Black’s style guide")
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.
Preserving the source formatting for these cases means that the longstanding formatter incompatibility with our ISC001 rule is now resolved. Users will no longer see a warning if they have both the formatter and this lint rule enabled in their Ruff configuration.
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 idea, have made the bump in 122d4fd and rebased
This will let us use `pyproject.toml` for stuff that is specific to utils (like dependencies) and we can stop copying it into each app.
This is where the apps should look for their linter config now.
This is no longer used anywhere
It’s faster and means we have one fewer dependencies.
We were only using it for black config. We are no longer using black.
This will let us use
pyproject.toml
for stuff that is specific to utils (like dependencies) and we can stop copying it into each app.We can then delete the duplicate copy of
pyproject.toml
we had to create in #1187ruff format
is faster thanblack
and means we need one fewer dependency.While ruff aims for 99.9% compatibility with black our codebase is big enough to hit a couple of the differences, hence some slight changes to Python code, and the need to consider this a breaking change for consuming apps.