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

Ruff format #314

Merged
merged 4 commits into from
May 22, 2024
Merged

Ruff format #314

merged 4 commits into from
May 22, 2024

Conversation

tovrstra
Copy link
Member

This pull request takes care of the autoformatting mentioned in #313. I'm using Ruff format instead of Black. Both are very similar, but Ruff format is faster. Because I'd like to use Ruff also for linting (which is insanely fast and extensive) in the following pull request, it seems wise to use the same tool for as many tasks as possible.

This is a big change, but all of it is just formatting. I've excluded a few blocks from the autoformatting. See (# fmt: off and fmt: on) in 11c6203.

I've also upgraded a few other pre-commit tools to more recent versions, but this had any visible effect.

Tests pass on my machine.

@tovrstra
Copy link
Member Author

I'm planning to YOLO-merge this Wednesday, May 22, unless reviewed and approved earlier.

Copy link
Member

@PaulWAyers PaulWAyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with the switch to ruff. I've had both ruff and black locally for a while and can't see much difference. ruff seems more integrated (closer to one-stop shopping). Disadvantages I see from changing are:

  • change is hard.
  • ruff is developed by a for-profit company (unlike black)
  • even the latest version of ruff (0.4) is still not a version 1.0-type stable release.

It would be annoying to change to ruff and then have to change back because the company died or started charging money. But that is probably a minor concern.

@tovrstra
Copy link
Member Author

tovrstra commented May 14, 2024

I agree that there is not much information on how the company behind Ruff will survive in the long run, but given the popularity of Ruff, it will probably outlive the company and remain available as open source in some form. Upgrading is quite smooth. I've gone through upgrades from pre-0.1 to 0.4 and barely noticed. The usage is more stable than the version numbering suggests.

@tovrstra tovrstra merged commit 3235a15 into theochem:main May 22, 2024
7 checks passed
@tovrstra tovrstra deleted the ruff-format branch May 22, 2024 08:09
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