Find first direct child of a given type.
(node: SyntaxTreeNode, child_type: str)
| 146 | |
| 147 | |
| 148 | def _find_child(node: SyntaxTreeNode, child_type: str) -> SyntaxTreeNode | None: |
| 149 | """Find first direct child of a given type.""" |
| 150 | for child in node.children: |
| 151 | if child.type == child_type: |
| 152 | return child |
| 153 | return None |
| 154 | |
| 155 | |
| 156 | def _href(link: SyntaxTreeNode) -> str: |
no outgoing calls
no test coverage detected