-
Notifications
You must be signed in to change notification settings - Fork 5
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
use ruff instead of black
/ flake8
/ isort
across RAPIDS
#130
Comments
This was referenced Dec 30, 2024
flake8
/ isort
across RAPIDSblack
/ flake8
/ isort
across RAPIDS
Be aware that some repositories may value isort's sorting of Cython files, which ruff does not yet do (see discussion in astral-sh/ruff#1079 and astral-sh/ruff#10250). We chose to accept this in cudf, see rapidsai/cudf#14882 (comment). |
Thanks for that note and for the |
KyleFromNVIDIA
added a commit
to rapidsai/pre-commit-hooks
that referenced
this issue
Jan 31, 2025
And also rename `test/` to `tests/` to align with the rest of RAPIDS. Issue: rapidsai/build-planning#130
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
ruff
is a fast, actively-maintained static analysis tool that implements a TON of linting rules, including those fromisort
,flake8
, and 20+flake8-*
extensions.ref: https://docs.astral.sh/ruff/rules/#legend
ruff-format
can also perform auto-formatting of Python code, similar toblack
.Every RAPIDS repo should use
ruff
, and stop usingblack
,isort
andflake8
.Benefits of this work
pyproject.toml
files, by allowing removal of.flake8
/setup.cfg
across repos.ipynb
) without needing to involve additional libraries like nbQA (example: enforce ruff checks on Python code in notebooks (fixes #333) deployment#370)Acceptance Criteria
ruff
is used in all RAPIDS reposblack
is not used directly in any RAPIDS reposflake8
is not used directly in any RAPIDS reposisort
is not used directly in any RAPIDS reposruff
configuration is stored inpyproject.toml
filesNotes
Motivating discussions:
Approach
These updates can be done in any order, since they're self-contained to individual repos.
When porting configuration to
ruff
, try to match the project's existing style preferences to minimize style-related changes.Updates
The text was updated successfully, but these errors were encountered: