papyri 0.0.8 Pypi GitHub

Parameters
resolve_(qa: str, known_refs: FrozenSet[papyri.take2.RefInfo], local_refs: FrozenSet[str], ref: str, rev_aliases: Dict[Cannonical, FullQual]) -> papyri.take2.RefInfo

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

Given this informations 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 (.valueTODO: 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.

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

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /papyri/tree.py#99
type: <class 'function'>
Commit: