blob: f3e6a46663e1000ed5decc2326320f59e1491e84 [file] [log] [blame] [edit]
extend = "../../.ruff.toml" # Inherit the project-wide settings
# 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_clinic.py",
# Excluded (these aren't actually executed, they're just "data files")
"tokenizedata/*.py",
# Non UTF-8 files
"encoded_modules/module_iso_8859_1.py",
"encoded_modules/module_koi8_r.py",
# New grammar constructions may not yet be recognized by Ruff,
# and tests re-use the same names as only the grammar is being checked.
"test_grammar.py",
# Lazy import syntax (PEP 810) is not yet supported by Ruff
"test_lazy_import/__init__.py",
"test_lazy_import/data/*.py",
"test_lazy_import/data/**/*.py",
]
[lint]
select = [
"F401", # Unused import
"F811", # Redefinition of unused variable (useful for finding test methods with the same name)
]
[lint.per-file-ignores]
"*/**/__main__.py" = ["F401"] # Unused import
"test_import/*.py" = ["F401"] # Unused import
"test_importlib/*.py" = ["F401"] # Unused import
"typinganndata/partialexecution/*.py" = ["F401"] # Unused import