[ruff] Enable a dozen rules from ruff 0.16 - #14915
Merged
Pierre-Sassoulas merged 3 commits intoAug 27, 2026
Merged
Conversation
Member
Author
|
I can't merge this, probably because of the coverage. I'm going to look into it. |
'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>
Pierre-Sassoulas
force-pushed
the
ruff-enable-rules-needing-no-refactor
branch
from
August 27, 2026 06:37
ef96e72 to
f5e9f31
Compare
RonnyPfannschmidt
approved these changes
Aug 27, 2026
nicoddemus
approved these changes
Aug 27, 2026
Member
Author
|
Thank you for the review, I still can't merge becuase of the coverage, didn't find out why and I didn't find a way to upgrade the coverage easily either. (will work on it later unless you think of an easy solution) |
Member
|
codecov is a utter mess intentionally put a pragma no cover on it - as far as i can tell its never to be invoked, only to be assessed in the helper |
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.
Exclude never-invoked assert helpers from coverage
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Pierre-Sassoulas
force-pushed
the
ruff-enable-rules-needing-no-refactor
branch
from
August 27, 2026 15:12
cc2b17e to
2c26a46
Compare
Pierre-Sassoulas
enabled auto-merge
August 27, 2026 15:13
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.