Structs§
- Python
Class Reference Scope - Binding events in an executing class namespace at one reference. Only a proved static superclass path precedes that class statement’s name binding. Lazy type-parameter expressions and other header contexts keep that event. Other events retain the existing whole-scope conservative interpretation.
- Python
Direct Scope Binding - Python
Lexical Scope Bindings - Completed function binding facts without borrowed tree-sitter nodes. Retain these only under the identity of the exact source that produced them.
- Python
Lexical Scope Inventory - Function-scope Python bindings discovered from tree-sitter structure.
Enums§
Functions§
- python_
binding_ targets_ bounded - Collect the binders in one already-selected assignment or loop target. Attribute/subscript operands remain reads, and exhaustion stays explicit. Callers supply the grammar field rather than reconstructing target syntax.
- python_
comprehension_ binds_ name_ at - Whether
referencereads a target introduced by an enclosing comprehension. - python_
comprehension_ binds_ name_ at_ bounded - The same scope proof under the caller’s work/cancellation ledger. An interrupted walk must not be interpreted as an unbound name.
- python_
direct_ scope_ bindings_ bounded - Return the bindings introduced directly by
node. - python_
executable_ scope_ children - Iterate executable-scope children, skipping nested callable and class bodies.
- python_
global_ binding_ is_ untouched_ bounded - Prove that a selected
globalroute has no known binding event in its executing enclosing scopes. Outer locals are unrelated to this namespace; an outer scope declaring the same global can still replace its identity. Class namespaces are not captured: only explicit global events are read. The caller has already selectedglobal_scopeby lexical precedence. - python_
is_ type_ parameter_ binder - Whether this identifier is the binder (rather than a bound/constraint use) of one structured PEP 695 type parameter.
- python_
module_ or_ class_ scope_ binds_ name_ bounded - Whether a module or class execution scope binds
target_nameanywhere in its direct scope. Nested callable and class bodies are separate scopes, but their headers still execute in this scope. A wildcard import keeps the name’s runtime identity open even when it does not expose a static binder. - python_
name_ resolution_ at - Resolve
namethrough the nearest enclosing function scope. This is the structured fallback for references inside nested functions that do not have their own indexedCodeUnitscope snapshot. - python_
type_ parameter_ binds_ name_ at - Whether
referencereads a PEP 695 type parameter declared by its enclosing class, function, or type-alias definition. - python_
type_ parameter_ binds_ name_ at_ bounded - The shared type-parameter proof under the caller’s live work budget. An interrupted ancestor, binder, or directive walk supplies no answer.
- python_
unambiguous_ module_ binding_ bounded - The kind of the module scope’s one binding of
target_name. - python_
unambiguous_ module_ binding_ node_ bounded - The module scope’s unique binding event, after the bounded proof completes.
- python_
unambiguous_ module_ class_ binding_ bounded