Repository navigation
[3.14] gh-163121: Skip test_patma.py in the Ruff config for Lib/test - #163209
Merged
Merged
Conversation
Robertboy18
requested review from
AA-Turner,
AlexWaygood,
StanFromIreland and
hugovk
as code owners
December 5, 2026 18:15
hugovk
reviewed
Dec 5, 2026
Comment on lines
+17
to
+18
| # Ruff does not yet accept `_` as a keyword name in a class pattern | ||
| # (astral-sh/ruff#31300) |
Member
There was a problem hiding this comment.
Thanks for the PR! Let's match the comment in main and 3.15:
Suggested change
| # Ruff does not yet accept `_` as a keyword name in a class pattern | |
| # (astral-sh/ruff#31300) | |
| # Unary plus literal pattern is not yet supported by Ruff (GH-145239) |
Member
There was a problem hiding this comment.
But that's not why this line is here -- apparently that pattern isn't used in 3.14. But the new underscore-as-keyword test does upset that ruff version.
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.
@gvanrossum here's the 3.14-only Ruff fix you mentioned :)
3.14 pins Ruff 0.15.4, which still rejects
_as a keyword name in a class pattern (astral-sh/ruff#31300), so the lint on #163165 trips over the new tests. Main and 3.15 already skiptest_patma.pyinLib/test/.ruff.toml, so this just does the same here. Running Ruff 0.15.4 overLib/testthe way pre-commit does, the backport'stest_patma.pygoes from four errors to none with this change.It only touches the lint config, so I think it needs
skip news. Once it's in, #163165 just needs an "Update branch" to pick it up.I used AI tools to help prepare this and checked it myself.
_as a keyword name in a class pattern raises a SyntaxError right after a positional pattern #163121