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)
"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
try:
pyc_file = importlib.util.cache_from_source(source)
shutil.move(pyc_file, legacy_pyc)
- except (FileNotFoundError, NotImplementedError):
+ except FileNotFoundError, NotImplementedError:
if not allow_compile:
raise
py_compile.compile(source, legacy_pyc, doraise=True)