From aa03e98c307fdee85475e308b9b731caf2c725bd Mon Sep 17 00:00:00 2001 From: David Vo Date: Sun, 30 Aug 2026 22:02:59 +1000 Subject: [PATCH] Enable linting of lazy import tests (GH-156624) (cherry picked from commit d59d4e747c76d39a6ac80025cff4686a9fa96eaf) Co-authored-by: David Vo --- Lib/test/.ruff.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Lib/test/.ruff.toml b/Lib/test/.ruff.toml index dca74eb6e14bbd0..da4f32a01bccf5d 100644 --- a/Lib/test/.ruff.toml +++ b/Lib/test/.ruff.toml @@ -14,10 +14,8 @@ extend-exclude = [ # 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", + # Intentional bad lazy import syntax + "test_lazy_import/data/badsyntax/*.py", # Unary plus literal pattern is not yet supported by Ruff (GH-145239) "test_patma.py", ] @@ -32,4 +30,5 @@ select = [ "*/**/__main__.py" = ["F401"] # Unused import "test_import/*.py" = ["F401"] # Unused import "test_importlib/*.py" = ["F401"] # Unused import +"test_lazy_import/**/*.py" = ["F401"] # Unused import "typinganndata/partialexecution/*.py" = ["F401"] # Unused import