-
Notifications
You must be signed in to change notification settings - Fork 924
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
lint: replace isort
with Ruff's rule I
#16685
Conversation
Hi @Borda, thanks for this. However, we have been keeping isort because ruff does not support Cython code but isort does. See this discussion for more info: #14882 (comment) |
@bdice the rest of the discussion in that thread does suggest that we'd be OK with making the switch and losing the limited Cython support. Maybe should go ahead with this now. |
You’re right. I forgot the rest of that discussion. @vyasr If you’re in support, I am fine with it. |
/ok to test |
You'll notice that we have isort configuration in each of our Python package's pyproject.toml files, like cudf's here. We definitely want to preserve those rules, so you'll need to add those back as well. #14882 (comment) discusses a bit how we could accomplish this in a way that shares most of the logic between the different packages in the repo. ruff's docs also have some discussion of how to ensure near-equivalent results, and if you scroll down you'll see discussion of the first/third-party configuration and more. Hopefully that provides you a good enough starting point, but please follow up if you have more questions! |
@Borda let us know if you need any help here. Please also retarget this PR at branch-24.12, we are on the verge of freezing 24.10. |
sure will do it over weekend 🦩 |
/ok to test |
This reverts commit 7b486f0.
/ok to test |
Co-authored-by: Lawrence Mitchell <[email protected]>
@Borda I'm going to trigger tests to run -- we can hold off on merging the upstream for now, unless there are conflicts. |
/ok to test |
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 have a few local changes to push, then will re-trigger CI. I think this is nearly ready?
/ok to test |
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.
/ok to test |
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.
Cool this LGTM now.
/merge |
Thanks @Borda! |
Thanks for this @Borda! |
Description
since #15312 moved formatting from Black to Rufft, it would make sense also unify import formatting under the same ruff so use build-in
I
rule instead of additionalisort
Checklist