Documentation
¶
Overview ¶
Package python implements a Python extractor backed by tree-sitter.
Coverage:
- SymbolFile / SymbolStruct (class) / SymbolFunction / SymbolMethod / SymbolVar (module-level assignments)
- EdgeContains, EdgeHasMethod, EdgeImports
- EdgeCalls (v0.4+, F-B): best-effort, AST-only resolution
Call resolution rules (v0.4):
- bare `foo()` where `foo` is a module-level definition in the same file → CALLS edge.
- `self.method()` inside a method of class `C` where `C.method` exists in the same file → CALLS edge.
- All other call shapes (cross-module, dynamic dispatch, *args unpacking, decorators-as-calls) are dropped silently.
Known false-positive class: a local variable that shadows a module-level name will still be resolved against the module-level symbol. We don't track per-scope shadowing in v0.4. Documented in FINDINGS.md F-B "fixed" entry.
IMPLEMENTS / RETURNS / ACCEPTS edges remain unsupported (Python's dynamic typing means this requires a real type checker).
Index ¶
- type Extractor
- func (e *Extractor) Extensions() []string
- func (e *Extractor) Extract(_ context.Context, _ string, _ []byte) ([]core.Symbol, []core.Edge, error)
- func (e *Extractor) ExtractRepo(ctx context.Context, root string) ([]core.Symbol, []core.Edge, error)
- func (e *Extractor) FQN(_ context.Context, file string, scope []string, name string) core.FQN
- func (e *Extractor) Language() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct{}
func (*Extractor) Extensions ¶
func (*Extractor) ExtractRepo ¶
Click to show internal directories.
Click to hide internal directories.