MCPcopy
hub / github.com/vinta/awesome-python / _find_child

Function _find_child

website/readme_parser.py:148–153  ·  view source on GitHub ↗

Find first direct child of a given type.

(node: SyntaxTreeNode, child_type: str)

Source from the content-addressed store, hash-verified

146
147
148def _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
156def _href(link: SyntaxTreeNode) -> str:

Callers 2

_find_inlineFunction · 0.85
_parse_list_entriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected