From c6dc437137ed4b9a2dcf2b0727bed5a896425760 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:12:31 +0200 Subject: [PATCH] [3.14] gh-144639: Ruff: target Python 3.14 syntax in `Lib/test` (GH-144656) (cherry picked from commit 81484c5629f9d8b698a2be58f850a0e4efe48ed3) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Alex Waygood Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Lib/test/.ruff.toml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Lib/test/.ruff.toml b/Lib/test/.ruff.toml index f800dc03dce62f..f6a4dc631c76b6 100644 --- a/Lib/test/.ruff.toml +++ b/Lib/test/.ruff.toml @@ -1,6 +1,7 @@ extend = "../../.ruff.toml" # Inherit the project-wide settings -target-version = "py312" +# Unlike Tools/, tests can use newer syntax than PYTHON_FOR_REGEN +target-version = "py314" extend-exclude = [ # Excluded (run with the other AC files in its own separate ruff job in pre-commit) @@ -15,15 +16,6 @@ extend-exclude = [ "test_grammar.py", ] -[per-file-target-version] -# Type parameter defaults -"test_type_params.py" = "py313" - -# Template string literals -"test_annotationlib.py" = "py314" -"test_string/test_templatelib.py" = "py314" -"test_tstring.py" = "py314" - [lint] select = [ "F811", # Redefinition of unused variable (useful for finding test methods with the same name)