-
Notifications
You must be signed in to change notification settings - Fork 280
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
STY: switching from black to ruff-format ? #4748
Comments
|
Yes, there are a number of actively discussed tickets about it, most prominently astral-sh/ruff#7146 |
black 24.1.0 is here, and should land in a pre-commit.ci auto PR about 10 days from now.
In my opinion, smaller diffs are preferable, but the comparison might be slightly biased towards |
OK, this is pretty convincing. I think it might be time! |
I'm not sure when it happened but now |
Then shall we? |
Yes, but just to avoid shooting ourselves in the foot by making some backports harder, I suggest we do that after yt 4.3.1 ! |
ruff
now comes with a super fast formatter, which draws heavily from black. The formatter is currently in beta but is expected to reach maturity very soon.There are a couple intentional deviations from black's style, which currently affect about 100 lines of code in yt (roughly 0.1%), and to me they all make sense.
Do we want to migrate from black to ruff at some point ?
Expected gains:
pre-commit run --all-files
) locally as well as pre-commit.ci (from 20s to 7s as of my latest measurement)Predictable costs:
blacken-docs
so we'd have to manage 2 very-slightly different styles and hooks if we migrated nowTo me gains seem to outweigh costs, so I'd propose to perform the migration sometimes after the formatter is out of beta, if a consensus is reached.
The text was updated successfully, but these errors were encountered: