mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
Delete is_node_with_body
method (#9643)
This commit is contained in:
parent
ffd13e65ae
commit
5fe0fdd0a8
1 changed files with 0 additions and 16 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue