Skip to content

Commit c891d75

Browse files
committed
Ruff: target Python 3.14 syntax in Lib/test
1 parent 9b8d59c commit c891d75

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Lib/test/.ruff.toml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
extend = "../../.ruff.toml" # Inherit the project-wide settings
2-
3-
target-version = "py312"
2+
target-version = "py314"
43

54
extend-exclude = [
65
# Excluded (run with the other AC files in its own separate ruff job in pre-commit)
@@ -15,15 +14,6 @@ extend-exclude = [
1514
"test_grammar.py",
1615
]
1716

18-
[per-file-target-version]
19-
# Type parameter defaults
20-
"test_type_params.py" = "py313"
21-
22-
# Template string literals
23-
"test_annotationlib.py" = "py314"
24-
"test_string/test_templatelib.py" = "py314"
25-
"test_tstring.py" = "py314"
26-
2717
[lint]
2818
select = [
2919
"F401", # Unused import

Lib/test/support/import_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def make_legacy_pyc(source, allow_compile=False):
7171
try:
7272
pyc_file = importlib.util.cache_from_source(source)
7373
shutil.move(pyc_file, legacy_pyc)
74-
except (FileNotFoundError, NotImplementedError):
74+
except FileNotFoundError, NotImplementedError:
7575
if not allow_compile:
7676
raise
7777
py_compile.compile(source, legacy_pyc, doraise=True)

0 commit comments

Comments
 (0)