Skip to content

[3.14] gh-163121: Skip test_patma.py in the Ruff config for Lib/test - #163209

Merged
gvanrossum merged 1 commit into
python:3.14from
Robertboy18:gh-163121-ruff-314
Dec 5, 2026
Merged

gvanrossum merged 1 commit into
python:3.14from
Robertboy18:gh-163121-ruff-314

Conversation

@Robertboy18

@Robertboy18 Robertboy18 commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

@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 skip test_patma.py in Lib/test/.ruff.toml, so this just does the same here. Running Ruff 0.15.4 over Lib/test the way pre-commit does, the backport's test_patma.py goes 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Comment thread Lib/test/.ruff.toml
Comment on lines +17 to +18
# Ruff does not yet accept `_` as a keyword name in a class pattern
# (astral-sh/ruff#31300)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gvanrossum
gvanrossum merged commit a727e72 into python:3.14 Dec 5, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants