Returns whether this leaf is part of a type annotation.
(leaf: Leaf)
| 1060 | |
| 1061 | |
| 1062 | def is_part_of_annotation(leaf: Leaf) -> bool: |
| 1063 | """Returns whether this leaf is part of a type annotation.""" |
| 1064 | assert leaf.parent is not None |
| 1065 | return get_annotation_type(leaf) is not None |
| 1066 | |
| 1067 | |
| 1068 | def first_leaf(node: LN) -> Leaf | None: |
no test coverage detected