-
Notifications
You must be signed in to change notification settings - Fork 56
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
Adds ruff as a drop in replacement for black #91
base: main
Are you sure you want to change the base?
Conversation
Nice! I'd like to see about doing this to our SDK repo too. Can it replace |
Good call. Removed |
@rachfop - Not understanding exactly. So does this provide all the import sorting benefit of isort? If we're removing isort, why have a comment in the gitignore relating to the tool we don't use/support anymore? |
Ruff supports isort's action comments, so we can remove isort from the pyproject.tom, but use isort's |
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.
LGTM, thanks!
Looks like a lock conflict. I think you can merge main and just run |
Resolved merge! |
What was changed
Replaces Black with Ruff formatter.
Recently, ruff added the ability to format:
https://docs.astral.sh/ruff/formatter/
Known deviations:
https://docs.astral.sh/ruff/formatter/black/#newlines-are-inserted-after-all-class-docstrings
Removed isort:
Added a skip isort in the .giitignore file:
https://pycqa.github.io/isort/docs/configuration/action_comments.html
Ruff uses isort's
profile = black
by default:https://docs.astral.sh/ruff/faq/#how-does-ruffs-import-sorting-compare-to-isort>
Why?
Faster 🐎
Checklist
Closes
How was this tested: