{ } Raw JSON

bundles / papyri latest / papyri / tree / resolve_

function

papyri.tree:resolve_

source: /papyri/tree.py :169

Signature

def   resolve_ ( qa : str known_refs : frozenset[RefInfo] local_refs : frozenset[str] ref : str rev_aliases : dict[Canonical, FullQual] )  →  RefInfo

Summary

Given the current context (qa), and a str (ref), compute the RefInfo object.

Extended Summary

References are often relative based on the current context (which object you are currently in).

Given this information and all the local (same document) and global (same library/all libraries) references, compute the Reference Info object.

Parameters

qa : str

fully qualified path of the current object (.value). TODO: this will be weird for non object, like example.

known_refs : list of RefInfo

All the known objects we can refer to in current universe.

local_refs : list of str

All the current objects in current scope (same docstring).

ref : str

???

rev_aliases

Reverse alias map. As the import name of object may not be the fully qualified names, we may need a reverse alias map to resolve with respect to the import name.

Aliases

  • papyri.tree.resolve_