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

Add Ruff for linting and formatting #62

Open
svengt opened this issue Jan 8, 2025 · 1 comment
Open

Add Ruff for linting and formatting #62

svengt opened this issue Jan 8, 2025 · 1 comment

Comments

@svengt
Copy link
Contributor

svengt commented Jan 8, 2025

Currently, the codebase uses 2-space indentation, which differs from PEP 8's recommended 4 spaces. This occasionally leads to inconsistencies in pull requests where contributors accidentally use 4 spaces instead of 2.

Benefits of adding Ruff:

  • Automated formatting ensures consistent code style across all contributions
  • Fast and comprehensive linting catches common issues early
  • Single tool for both formatting and linting, simplifying the toolchain
  • Significantly faster than alternatives like Black + Flake8 + isort

Common issues it would prevent:

  • Inconsistent indentation between files
  • Unused imports and variables
  • Potential bugs that static analysis can catch
  • Style inconsistencies in pull requests

I'm happy to help implement this if there's interest.

@BrandonShar
Copy link
Collaborator

I'd definitely be interested in merging this if you're willing to set it up!

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