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
attributefields back to a namespace import and append each attribute component structurally. - resolve_
receiver_ type - target_
owner_ code_ unit - top_
level_ identifier