Documentation
¶
Overview ¶
Package python implements the Python language extractor.
Mirrors src/main/java/.../intelligence/extractor/python/PythonLanguageExtractor.java using the tree-sitter Python grammar.
Capabilities:
- METHOD nodes: emit CALLS edges for call nodes inside the matching function_definition.
- CLASS nodes: emit `extends_type` type-hint from the first superclass.
- MODULE nodes: emit `all_exports` type-hint from a top-level __all__ list (regex-matched on the source — fast and correct for the common module-level form).
Confidence: PARTIAL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct{}
Extractor implements LanguageExtractor for Python. Stateless.
func (*Extractor) Extract ¶
Extract dispatches by node kind. Single-node convenience wrapper; parses the file each call. Production paths use ExtractFromTree to amortise the parse across every node in a file.
func (*Extractor) ExtractFromTree ¶
func (e *Extractor) ExtractFromTree(ctx extractor.Context, tree *parser.Tree, nodes []*model.CodeNode) []extractor.Result
ExtractFromTree walks a single pre-parsed tree once and produces a Result per input node. Order matches `nodes`. tree may be nil — every node maps to EmptyResult in that case.