-
Notifications
You must be signed in to change notification settings - Fork 6.8k
BLD: Remove python/*
files from tool.ruff.lint.per-file-ignores
#55993
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
base: master
Are you sure you want to change the base?
Conversation
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.
Code Review
This pull request removes a number of Python file paths from the per-file-ignores
list for ruff
's isort
rules. The goal is to apply import sorting checks to more of the codebase. However, my review found that the primary isort
rule, I001
, is currently disabled globally. This makes the change a no-op, as no import sorting will be enforced on these files. I've added a comment suggesting to either enable I001
in this PR or combine this change with a future PR that does, to ensure configuration changes are effective and not misleading.
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.
hmm.. I am really surprised there are no changes required..
I guess we also need to add the filters into here:
Line 47 in 5f83c07
files: '^python/ray/serve/|^python/ray/train|^python/ray/data|^python/ray/_private/|^python/ray/llm/|^python/ray/tune/' |
@@ -61,20 +61,7 @@ afterray = ["psutil", "setproctitle"] | |||
# reformat the code to follow the style guide. | |||
[tool.ruff.lint.per-file-ignores] | |||
"doc/*" = ["I"] | |||
"python/ray/__init__.py" = ["I"] |
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.
can we keep this __init__.py
?
and also remove L59? which says setup-dev.py
needs to be exluded?
Signed-off-by: Gagandeep Singh <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
Signed-off-by: czgdp1807 <[email protected]>
triggered full premerge and see how things go. please split this into smaller PRs with smaller impact radius per PR. thanks. |
All tests pass. I am starting to work on splitting this PR into smaller chunks. :D. |
Why are these changes needed?
This is as suggested by @aslonnie (I hope I have done the right thing).
On my linux system,
ruff
test passes,+ pre-commit run ruff --all-files --show-diff-on-failure [INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... ruff.....................................................................Passed ruff.....................................................................Passed
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.