[ruff] Enable a dozen rules from ruff 0.16 - #14915
Open
Pierre-Sassoulas wants to merge 3 commits into
Open
Conversation
'logging.WARN' is another name for 'logging.WARNING', not a separate level, so the dict literal listed the same integer key twice and only ever held one of the two entries. LOG009 pointed this out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The argument is already a tuple, built by unpacking the previous scope, so wrapping it in 'tuple()' copies it for nothing. C409 pointed this out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FA102, N999, PGH005, PTH210, S112, LOG009 and the source half of C409 need no
change now that the two problems they found are fixed. The remaining four only
need a one-line exemption, because the violation is the thing under test:
SIM202 on the 'approx' operator overloading check, SIM222 and SIM223 in the
assertion rewriting tests, C409 where 'tuple([1, 2])' deliberately builds two
equal but distinct tuples ('assert v1 is not v2' on the next line).
Every exemption is a 'noqa' on the offending line rather than an entry in
'lint.ignore' or 'per-file-ignores', so the rules keep applying to the rest of
those files.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
|
I can't merge this, probably because of the coverage. I'm going to look into it. |
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.
Follow-up to #14913, manual this time, mostly disabling locally instead of globally.