STY: enforce RUF031 in pre-commit#5394
Open
neutrinoceros wants to merge 1 commit intoyt-project:mainfrom
Open
Conversation
Member
Author
|
actually there might be some good reason (other than lack of feedback) for this rule to not be marked as stable yet: (this shouldn't affect us though) |
Member
|
Thanks for doing this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bit of background: this linting rule was implemented in
ruffspecifically because we requested it for usage inyt. I originally selected the rule at the global level, knowning it was still in "preview" (i.e. unstable) mode, which had no effect beyond triggering a warning, because I was expecting it would be stabilized soon after. This hasn't happened (yet), presumably for a lack of feedback.Because the rule was tailored for an idiom very commonly seen in
yt, I figure it would make sense that we beta-test the unstable (but so far, absolutely correct) implementation so we can later confidently ask it be marked stable without change.refs:
a[(b, c)]->a[b, c]) ? astral-sh/ruff#11990incorrectly-parenthesized-tuple-in-subscript(RUF031) astral-sh/ruff#12480