diff --git a/crates/ruff_python_ast/src/visitor/transformer.rs b/crates/ruff_python_ast/src/visitor/transformer.rs index 68962941d6..f3e1c30bbc 100644 --- a/crates/ruff_python_ast/src/visitor/transformer.rs +++ b/crates/ruff_python_ast/src/visitor/transformer.rs @@ -234,9 +234,6 @@ pub fn walk_stmt(visitor: &V, stmt: &mut Stmt) { visitor.visit_expr(test); visitor.visit_body(body); for clause in elif_else_clauses { - if let Some(test) = &mut clause.test { - visitor.visit_expr(test); - } walk_elif_else_clause(visitor, clause); } }