Extract classes, functions, and imports from a .py file via tree-sitter AST.
(path: Path)
| 5851 | # ── Public API ──────────────────────────────────────────────────────────────── |
| 5852 | |
| 5853 | def extract_python(path: Path) -> dict: |
| 5854 | """Extract classes, functions, and imports from a .py file via tree-sitter AST.""" |
| 5855 | result = _extract_generic(path, _PYTHON_CONFIG) |
| 5856 | if "error" not in result: |
| 5857 | _extract_python_rationale(path, result) |
| 5858 | return result |
| 5859 | |
| 5860 | |
| 5861 | def extract_js(path: Path) -> dict: |