-
Notifications
You must be signed in to change notification settings - Fork 927
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
Apply ruff everywhere (notebooks and scripts) #17820
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
In #17461, @wence- were you trying to say you are hesitant to apply ruff
without a config for sorting cudf
into a separate section? I am okay with the diff shown here, but if you're not, I wanted to let you opine. We could use an import section config of some kind, but I find it unimportant in notebooks (only within the library internals).
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.
I just meant that we didn't port the isort config for notebooks over. I am happy with any consistent sorting!
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.
I approve of this approach but given the nature of the change it's best if we get at least one more approval before merging.
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.
FYI linting and formatting will be possible in one command soon https://docs.astral.sh/ruff/formatter/#sorting-imports.
/merge |
Description
This PR applies
ruff
(check
andformat
) everywhere, including notebooks and utility scripts. This allows us to drop our use ofnbqa
, sinceruff
natively supports notebooks. (xref: #17819, #17805)I manually updated a few notebooks that were using old NumPy syntax for generating random values.
Closes #17461.
I also updated the
ruff
version to 0.9.3.Checklist