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§
- Parsed
File - Python
Project Graph - Python
Scan Target - Immutable target facts shared by every file in one forward usage scan.
- ScanCtx
- Scan
Result
Functions§
- build_
python_ graph - call_
result_ types - collect_
assigned_ identifiers - Collect the names an assignment or
fortarget binds: plain identifiers and identifiers nested in destructuring patterns. Anattribute,subscript, orcalltarget is evaluated, not bound (recv.member = vandmake().member = vbind 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 validstrboundary (adversarial or partially-parsed input).
Type Aliases§
- Python
Seed Scan - One target’s resolver snapshot, immutable facts and import/re-export seeds.