-
Notifications
You must be signed in to change notification settings - Fork 58
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
Enable ruff format skip-magic-trailing-comma #2975
Conversation
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.
At first I thought this PR did the exact opposite, but now I realize I am 200% for this change. I want to read the code naturally and see a lot of context on my screen, and not
keep
having
to
scroll
down
after
every
three
function
calls.
7b8fd72
to
2491e34
Compare
2491e34
to
54b8c03
Compare
We currently don't have a lot of big PRs open, so merging this now shouldn't generate a lot of merge conflicts. I have looked into alternatives, but enabling this is the only way to make sure that there is one way to format the same code instead of two. So while in some cases the code might be a little bit more readable when not collapsed into a single line, I think having only one way to format code and less noise in PRs is more important. The only thing I did was add the option to pyproject.toml and run pre-commit so there should only be formatting changes in this PR. |
I agree, and I was waiting for a moment like this to pull this PR back to the front. Lets see if this is the moment. |
Quality Gate failedFailed conditions |
Changes
This enables ruff format skip-magic-trailing-comma. This prevents formatting only changes in PRs when an argument is added and later removed.
The downside is that in some cases it might be more readable to have each argument on a single line, but in my opinion it more important to have consistent formatting and prevent formatting only changes in PRs.
Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.