Skip to content
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

STY: apply autofixes for RUF031 #5070

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

neutrinoceros
Copy link
Member

@neutrinoceros neutrinoceros commented Dec 1, 2024

PR Summary

Follow up to #4844 and #4998 after I realized that simply selecting the rule was insufficient to trigger auto-fixes as it's still under preview mode.
While configuring a narrow preview mode is supported (https://docs.astral.sh/ruff/preview/#using-rules-that-are-in-preview), I found that it's still impractical for us for now because it would result in triggering all UP031 violations without auto-fixes available (addressed in #5064).

for reference, this patch is obtained via

ruff check yt --select RUF031 --preview --fix

@neutrinoceros neutrinoceros added code style Related to linting tools refactor improve readability, maintainability, modularity labels Dec 1, 2024
Copy link
Member

@cphyc cphyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I'm glad to see this done by ruff rather than manually (#4844 was painful!)

@cphyc cphyc merged commit 6672c17 into yt-project:main Dec 3, 2024
13 checks passed
@neutrinoceros neutrinoceros deleted the sty/RUF031 branch December 3, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code style Related to linting tools refactor improve readability, maintainability, modularity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants