bundles / papyri 0.0.10 / papyri / gen / normalise_ref
_lru_cache_wrapper
papyri.gen:normalise_ref
source: /papyri/gen.py :195
Signature
def normalise_ref ( ref : str ) → str Summary
Consistently normalize references.
Extended Summary
Refs are sometime import path, not fully qualified names, tough type inference in examples regularly give us fully qualified names. When visiting a ref, this tries to import it and replace it by the normal full-qualified form.
This is expensive, and we likely want to move the logic of finding the correct ref earlier in the process and use this as an assertion the refs are normalized.
It is critical to normalize in order to have the correct information when using interactive ?/??, or similar inspector of live objects;
Aliases
-
papyri.gen.normalise_ref