-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Misc] Using ruff-format for smaller sets of directories #14485
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
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
After editing the pre-commit config, I suggest running pre-commit with |
Yep I make a separate commit, so that we can revert it if needed, but yeah it changes a lot of files. |
I think we can follow #13971 and only update testing/new code to use ruff format. |
1d9808f
to
8d3bc6f
Compare
fd782bc
to
75b8ea9
Compare
This pull request has merge conflicts that must be resolved before it can be |
95c38d9
to
652d9e5
Compare
This pull request has merge conflicts that must be resolved before it can be |
652d9e5
to
f88458a
Compare
This pull request has merge conflicts that must be resolved before it can be |
4895846
to
2a229ad
Compare
Just to get the configs in, can you open a separate PR that changes one of the smaller directories? |
2a229ad
to
b68e254
Compare
758376d
to
6c6f719
Compare
.pre-commit-config.yaml
Outdated
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.
ruff
's isort
currently also ignores these directories
.pre-commit-config.yaml
Outdated
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.
Could this exclude be moved to the pyproject.toml
? Generally we prefer to avoid configuration that only works if the formatting tools are run via pre-commit (i.e. we would like format on save to work correctly)
.pre-commit-config.yaml
Outdated
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.
Could this be move to pyproject.toml
? Reason is same as above.
.pre-commit-config.yaml
Outdated
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.
Is this line necessary?
pyproject.toml
Outdated
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.
- 4 is the default indent width anyway
- The docs for target-version say to use
[project]
requires-python ...
which we are already doing
indent-width = 4 | |
target-version = "py39" |
pyproject.toml
Outdated
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.
These are also defaults so do not need to be specified
quote-style = "double" | |
indent-style = "space" |
pyproject.toml
Outdated
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.
Instead of doing this we should adopt the black
line length of 88. Currently this file sets it to 80
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
6c6f719
to
81f3904
Compare
This pull request has merge conflicts that must be resolved before it can be |
We will incrementally introduce ruff-format into the codebase, and slowly deprecate yapf and isort.
Currently, follows #14492 delta for directories options.
Signed-off-by: Aaron Pham [email protected]