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

Enable ruff format? #636

Closed
DimitriPapadopoulos opened this issue Jan 8, 2024 · 7 comments
Closed

Enable ruff format? #636

DimitriPapadopoulos opened this issue Jan 8, 2024 · 7 comments

Comments

@DimitriPapadopoulos
Copy link
Contributor

DimitriPapadopoulos commented Jan 8, 2024

The Ruff Formatter

@DimitriPapadopoulos
Copy link
Contributor Author

To see how it formats Python source code, run:

ruff format .

@adrienverge
Copy link
Owner

I'm -1 to change the current source code and alter Git history for 65 files and ~10k lines of code. Also I don't have a problem with currently-used single quotes or mixed indentation when it helps readability.

@DimitriPapadopoulos
Copy link
Contributor Author

Single quotes won't change:

  • ruff has always been supporting single quotes,
  • black started supporting them recently.

I haven't investigated indentation.

@DimitriPapadopoulos
Copy link
Contributor Author

While git blame --ignore-revs-file is not perfect, it helps ignore changes related to formatting.

@DimitriPapadopoulos
Copy link
Contributor Author

Let me run ruff format and try to minimize changes, so we can see the extent of changes.

@DimitriPapadopoulos
Copy link
Contributor Author

indent-style is either tab or space.

@adrienverge
Copy link
Owner

Good that ruff supports mixed quotes 👍
I see all the changes in #638, and I still don't think it helps readability, especially about the mixed indentations I mentioned. And changing all these 63 files is not appealing...

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