Chore: Ignore PLR0917 in test suites - #148
Merged
tykeal merged 1 commit intoJul 30, 2026
Merged
Conversation
ruff 0.16.0 stabilised PLR0917, "too many positional arguments". This repository already selects the PL category, so the rule began firing on six test functions the moment the pre-commit autoupdate crossed that version boundary, on code nobody had touched. Tests that stack @patch decorators cannot satisfy it. unittest.mock injects each mock positionally, so a keyword-only signature is impossible rather than merely inconvenient. PLR0913, the sibling rule counting all arguments, is already ignored globally here. This adds its positional-only counterpart to the test per-file-ignores, matching the convention the organisation adopted when the same release broke fifteen repositories at once. Verified against both ruff versions: all checks pass under 0.15.22, the currently pinned release, and under 0.16.0, which the open autoupdate pull request moves to. Co-authored-by: Claude <claude@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 30, 2026 12:18
View session
There was a problem hiding this comment.
Pull request overview
This PR updates the Ruff configuration to prevent PLR0917 (“too many positional arguments”) from failing test suites, aligning the test linting rules with how unittest.mock.patch injects mocks positionally.
Changes:
- Add
PLR0917to Ruffper-file-ignoresfortests/**/*.py. - Document why
PLR0917is not actionable for tests that stack@patchdecorators, and how this relates to the already-ignoredPLR0913.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tykeal
approved these changes
Jul 30, 2026
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.
Why
ruff 0.16.0 stabilised
PLR0917("too many positional arguments"). This repository already selects thePLcategory, so the rule began firing on six test functions the moment thepre-commitautoupdate crossed that version boundary — on code nobody had touched. That is what fails the open autoupdate PR #145 here.Tests that stack
@patchdecorators cannot satisfy it:unittest.mockinjects each mock positionally, so a keyword-only signature is impossible rather than merely inconvenient.PLR0913, the sibling rule counting all arguments, is already ignored globally here. This adds its positional-only counterpart to the testper-file-ignores, matching the convention adopted across the organisation when the same release broke fifteen repositories at once.Verified
All checks pass under both ruff 0.15.22 (currently pinned) and 0.16.0 (what the autoupdate PR moves to).