-
Notifications
You must be signed in to change notification settings - Fork 538
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
Integrate Ruff Formatter into Pre-commit Workflow #119
base: main
Are you sure you want to change the base?
Conversation
Also fixes #120 . |
Ruff already does what Black does. The ruff version in .pre-commit-config.yaml just needs to be updated since it is using an older version of ruff along with some rules in pyproject.toml or ruff.toml with regards to #120, ruff allows exclusion of directories/files . Also, just needs to be added to the pyproject.toml or ruff.toml |
Currently the repo uses ruff linter but not ruff formatter. Indeed the ruff formatter is very similar to black so I can replace black by the ruff formatter if you prefer. |
Changed to ruff formatter! Thanks @omarirfa for the advice. |
Thanks a lot @huguesva, this will be very useful! 🤗 |
@huguesva you have some conflicts to solve before I can merge this! |
@aymeric-roucher done ! :) |
@huguesva this does not pass quality tests: it could be due to an inconsistency in ruff versions between the pre-commit hook and the CI, I think this needs to be solved before we merge else it'll break CI for people who commit! After discussing this with team members, compatibility with CI formatting seems like a regular issue of these pre-commit workflows for formatting: so maybe there's no easy fix |
any update @huguesva ? Tell me if I can be of any help! |
Motivations : Black is a widely adopted formatter in the Python community. It aims to enhance code consistency and readability.