{ } Raw JSON

bundles / papyri latest / papyri / tree / _build_resolver_cache

function

papyri.tree:_build_resolver_cache

source: /papyri/tree.py :79

Signature

def   _build_resolver_cache ( known_refs : frozenset[RefInfo] )  →  tuple[dict[str, RefInfo], frozenset[str]]

Summary

Build resolver cached.

Extended Summary

Here we build two caches:

  • a mapping from fully qualified names to refinfo objects.

  • a set of all the keys we know about.

Parameters

known_refs : (frozen) set of RefInfo

Returns

: mapping:

Mapping from path to a RefInfo, this allows to quickly compute what is the actual refinfo for a give path/qualname

: keyset:

Frozenset of the map keys.

Aliases

  • papyri.tree._build_resolver_cache