mirror of
https://github.com/python/cpython.git
synced 2026-01-05 23:12:38 +00:00
gh-133551: Support t-strings in annotationlib (GH-133553)
I don't know why you'd use t-strings in annotations, but now if you do,
the STRING format will do a great job of recovering the source code.
(cherry picked from commit 90f476e0f8)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
23 lines
820 B
TOML
23 lines
820 B
TOML
extend = "../../.ruff.toml" # Inherit the project-wide settings
|
|
|
|
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",
|
|
# SyntaxError because of t-strings
|
|
"test_annotationlib.py",
|
|
"test_string/test_templatelib.py",
|
|
"test_tstring.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",
|
|
]
|
|
|
|
[lint]
|
|
select = [
|
|
"F811", # Redefinition of unused variable (useful for finding test methods with the same name)
|
|
]
|