Skip to content

Commit

Permalink
Delete is_node_with_body method (#9643)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Jan 25, 2024
1 parent ffd13e6 commit 5fe0fdd
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions crates/ruff_python_ast/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5968,22 +5968,6 @@ impl<'a> AnyNodeRef<'a> {
}
}

pub const fn is_node_with_body(self) -> bool {
matches!(
self,
AnyNodeRef::StmtIf(_)
| AnyNodeRef::StmtFor(_)
| AnyNodeRef::StmtWhile(_)
| AnyNodeRef::StmtWith(_)
| AnyNodeRef::StmtMatch(_)
| AnyNodeRef::StmtFunctionDef(_)
| AnyNodeRef::StmtClassDef(_)
| AnyNodeRef::StmtTry(_)
| AnyNodeRef::ExceptHandlerExceptHandler(_)
| AnyNodeRef::ElifElseClause(_)
)
}

/// In our AST, only some alternative branches are represented as a node. This has historical
/// reasons, e.g. we added a node for elif/else in if statements which was not originally
/// present in the parser.
Expand Down

0 comments on commit 5fe0fdd

Please sign in to comment.