-
Notifications
You must be signed in to change notification settings - Fork 361
Switch from black to ruff format #2550
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
Conversation
|
Yes? No? Maybe? |
|
Probably. No resistance doing this change but properly mapping out the differences and double checking the config options is a good idea. Also need to make sure the tooling is up to date for the environments people are currently using. Resolved a conflict with dev branch to keep this up to date. |
|
There's infos on Basically it's 99.9% compatible with Black:
The 0.1% deviations are explained here: https://docs.astral.sh/ruff/formatter/black/ I think you're already running arcade/.pre-commit-config.yaml Lines 17 to 18 in f4f4521
So this PR would align devdocs / CI in line and go all-in on Let me know if there's anything else I can do here. |
|
Yup. We seems to have the majority of the maintains on board. I will adapt one of my local projects quickly first before I merging this just to get the full picture even if it's meant to be a drop-in replacement. Will merge in the next few days. The pre-commit I think was only a test that @eruvanos was using. It had some challenges depending on how your environment is set up. We should probably look into that as well soon. |
|
I'm up for merging this.
|
|
#2569 just got hit with the exact issue I mentioned (f-string handling in psf/black#4389).
@einarf any reasons not to merge this? |
Be free to merge. I have been swamped with work. |
pushfoo
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.
TL;DR: Let's do it. 🚀
I have one minor personal style preference to gripe over, and that's handled by # fmt: off + # fmt: on if I really need it.
This PR has three commits that are best reviewed one by one:
Related: #2139, #2165, #2214
Looks like
.pre-commit-config.yamlalready only runsruff format, noblack.So overall I think this is almost a drop-on replacement, just with some small gains in simplicity / consistency / speed.
Thoughts?