Skip to main content

Module resolver

Module resolver 

Source
Expand description

Python’s reference resolution: export-name and seed inference, receiver-type resolution, and annotation candidates.

index arguments below are the dispatching analyzer’s CodeUnitIndex (see PythonGraphSource); python is the Python analyzer’s memoized products.

Functions§

annotation_class_qualifier_site
Return the exact qualifier token when a class target owns part of a structured annotation attribute chain.
annotation_reference_candidates
Resolve a structured Python annotation reference.
annotation_reference_candidates_at_focus
Resolve only the annotation identifier selected by one definition request. Quoted annotations are reparsed with original byte coordinates, while the original syntax node remains the lexical class-scope anchor.
infer_export_names
infer_usage_seeds
member_name
normalized_receiver_type
receiver_annotation_matches_target
resolve_callable_parameter_default_types
Resolve the class in the nearest enclosing callable parameter default.
resolve_constructor_types
Resolve the class constructed by a Python call callee without interpreting source text. Bare callees use the import binder or same-file declarations; qualified callees walk tree-sitter’s attribute fields back to a namespace import and append each attribute component structurally.
resolve_receiver_type
target_owner_code_unit
top_level_identifier