Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

huguesva
Copy link

@huguesva huguesva commented Jan 8, 2025

Motivations : Black is a widely adopted formatter in the Python community. It aims to enhance code consistency and readability.

@huguesva
Copy link
Author

huguesva commented Jan 8, 2025

Also fixes #120 .

@omarirfa
Copy link
Contributor

omarirfa commented Jan 8, 2025

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

@huguesva
Copy link
Author

huguesva commented Jan 9, 2025

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.

@huguesva huguesva changed the title Integrate Black Formatter into Pre-commit Workflow Integrate Ruff Formatter into Pre-commit Workflow Jan 9, 2025
@huguesva
Copy link
Author

huguesva commented Jan 9, 2025

Changed to ruff formatter! Thanks @omarirfa for the advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants