Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions Lib/test/.ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extend = "../../.ruff.toml" # Inherit the project-wide settings

target-version = "py312"
target-version = "py314" # unlike `Tools/`, tests can use newer syntax than `PYTHON_FOR_REGEN`

extend-exclude = [
# Excluded (run with the other AC files in its own separate ruff job in pre-commit)
Expand All @@ -15,15 +14,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 = [
"F401", # Unused import
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/support/import_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def make_legacy_pyc(source, allow_compile=False):
try:
pyc_file = importlib.util.cache_from_source(source)
shutil.move(pyc_file, legacy_pyc)
except (FileNotFoundError, NotImplementedError):
except FileNotFoundError, NotImplementedError:
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for this specific change? (or is it a ruff change?)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a manual change.

Please see the linked issue: @brettcannon had suggested it in a PR (#144293) but it had to be reverted because our tools wouldn't let us use 3.14 syntax in 3.15 tests.

if not allow_compile:
raise
py_compile.compile(source, legacy_pyc, doraise=True)
Expand Down
Loading