Skip to main content

Module extractor

Module extractor 

Source
Expand description

Python’s forward, per-target usage scan: the scoped import closure, the per-file walk that proves a reference, and the receiver-type facts both this and the inverted walk resolve through.

Structs§

ParsedFile
PythonProjectGraph
PythonScanTarget
Immutable target facts shared by every file in one forward usage scan.
ScanCtx
ScanResult

Functions§

build_python_graph
call_result_types
collect_assigned_identifiers
Collect the names an assignment or for target binds: plain identifiers and identifiers nested in destructuring patterns. An attribute, subscript, or call target is evaluated, not bound (recv.member = v and make().member = v bind no local names), so its identifiers stay references and must not shadow same-named imports or declarations (#898).
collect_function_scope_facts_from_node
collect_module_binding_timeline
collect_scope_facts_from_parsed_source
enclosing_scope_facts
The per-function receiver-type facts enclosing node, if any. Shared by the forward scan (ScanCtx) and the inverted builder (PyScan) so the two paths resolve a receiver’s scope through one place.
is_declaration_identifier
python_first_function_definition
scan_file_for_seed_batch
Share syntax, scope facts and one iterative walk; bindings and hits stay target-local.
slice
Verbatim source text spanned by node, or "" when the byte range is not a valid str boundary (adversarial or partially-parsed input).

Type Aliases§

PythonSeedScan
One target’s resolver snapshot, immutable facts and import/re-export seeds.