Skip to content

Commit 060484b

Browse files
Subbarao Garlapatimeta-codesync[bot]
authored andcommitted
Exclude Lazy Imports tests from ruff F811 check
Summary: Our Lazy Imports tests in 3.14 fail the lint check ([example job](https://github.com/facebookincubator/cinder/actions/runs/29703681881/job/88236940889)) because when our tests intentionally check that imports are lazy, the same import may be getting defined twice. This trips up F811. To fix this, we exclude the lazy imports tests from the check. Reviewed By: kddnewton Differential Revision: D112820282 fbshipit-source-id: d529896d0119c1e8a06607078347a8337878a84b
1 parent a58fcc4 commit 060484b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/.ruff.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ extend-exclude = [
1414
# New grammar constructions may not yet be recognized by Ruff,
1515
# and tests re-use the same names as only the grammar is being checked.
1616
"test_grammar.py",
17+
# Lazy Imports tests intentionally re-import the same names to verify
18+
# laziness, which trips F811.
19+
"lazyimports/*.py",
1720
]
1821

1922
[lint]

0 commit comments

Comments
 (0)