-
Notifications
You must be signed in to change notification settings - Fork 186
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
Replace black by Ruff Formatter #127
Conversation
Looks fine overall, but it seems like too many changes with string normalization. Why force string normalization? That's going to cause a ton of pull requests to fail formatting validation. |
.pre-commit-config.yaml
Outdated
@@ -29,15 +29,11 @@ repos: | |||
- id: check-ast | |||
- repo: https://github.com/astral-sh/ruff-pre-commit | |||
# Ruff version (Used for linting) | |||
rev: v0.0.291 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it come with the new version? I don't see any related config (for example, line length)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it was introduced in https://github.com/astral-sh/ruff/releases/tag/v0.0.290, but I used the newer version to get some patches.
It is not supported yet; we can wait for astral-sh/ruff#8822 before merging. |
@hussein-awala the PR has been merged :) |
I was waiting for the release, the merged PR was released 3 days ago in v0.1.8 as a preview feature, for that I had to add
@rdblue could you check it now after changing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there are still differences, but I like them since it makes the code a bit more dense, without sacrificing readability.
Looks good to me now. Thanks, @hussein-awala! |
I just merged main and fixed the conflicts, it should be ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @hussein-awala for the contribution, and @rdblue for the review 🙌
We need to merge #253 to fix the failed tests in main. |
* Replace black by Ruff Formatter * update ruff version * fix format * Update ruff format and add preserve as a quote style
This PR replaces black with Ruff Formatter, which is 30x faster (https://astral.sh/blog/the-ruff-formatter). It also removes the
--skip-string-normalization
config to replace single quotes with double quotes.related: apache/iceberg#8294