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

Migrate from Black to Ruff #186

Open
l-lumin opened this issue Dec 21, 2024 · 1 comment
Open

Migrate from Black to Ruff #186

l-lumin opened this issue Dec 21, 2024 · 1 comment

Comments

@l-lumin
Copy link
Contributor

l-lumin commented Dec 21, 2024

Reason

  • Hatch build-in
    • Static analysis performed by the fmt command is (by default) backed entirely by Ruff.

  • Import sorting
    • Black does not support import sorting, requiring an additional tool (isort).
    • Ruff includes import sorting functionality, simplifying the workflow
  • Simpler workflow:
    • Instead use pre-commit run --all-files (need pre-commit), can use hatch fmt

If this proposal is approved, I will make a PR to implement these changes.

Reference

Black
Ruff

@elsell
Copy link

elsell commented Dec 23, 2024

Ruff is also much faster than black:

Image

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

No branches or pull requests

2 participants