Skip to content

Commit abfb684

Browse files
committed
tooling: Fix indentation after collapsing nested if statements.
1 parent 8dfa818 commit abfb684

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

tests/test_examples.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ def test_method_calls_exist_in_driver(self, driver_dir, example_path):
121121
part in driver_dir.name.replace("-", "_")
122122
for part in (node.module.split(".")[0],)
123123
):
124-
for alias in node.names:
125-
driver_imports.add(alias.asname or alias.name)
124+
for alias in node.names:
125+
driver_imports.add(alias.asname or alias.name)
126126

127127
if not driver_imports:
128128
pytest.skip(f"No driver import found in {example_path.name}")
@@ -132,16 +132,16 @@ def test_method_calls_exist_in_driver(self, driver_dir, example_path):
132132
driver_vars = set()
133133
for node in ast.walk(tree):
134134
if isinstance(node, ast.Assign) and isinstance(node.value, ast.Call):
135-
func = node.value.func
136-
func_name = None
137-
if isinstance(func, ast.Name):
138-
func_name = func.id
139-
elif isinstance(func, ast.Attribute):
140-
func_name = func.attr
141-
if func_name in driver_imports:
142-
for target in node.targets:
143-
if isinstance(target, ast.Name):
144-
driver_vars.add(target.id)
135+
func = node.value.func
136+
func_name = None
137+
if isinstance(func, ast.Name):
138+
func_name = func.id
139+
elif isinstance(func, ast.Attribute):
140+
func_name = func.attr
141+
if func_name in driver_imports:
142+
for target in node.targets:
143+
if isinstance(target, ast.Name):
144+
driver_vars.add(target.id)
145145

146146
if not driver_vars:
147147
pytest.skip(

0 commit comments

Comments
 (0)