Skip to content

Commit 0ae07cd

Browse files
authored
[ruff_python_ast] Fix redundant visitation of test expressions in elif clause statements (#18064)
1 parent 0fb94c0 commit 0ae07cd

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

crates/ruff_python_ast/src/visitor/transformer.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ pub fn walk_stmt<V: Transformer + ?Sized>(visitor: &V, stmt: &mut Stmt) {
234234
visitor.visit_expr(test);
235235
visitor.visit_body(body);
236236
for clause in elif_else_clauses {
237-
if let Some(test) = &mut clause.test {
238-
visitor.visit_expr(test);
239-
}
240237
walk_elif_else_clause(visitor, clause);
241238
}
242239
}

0 commit comments

Comments
 (0)