CanonicalAliasEnvironment#
- class penzai.treescope.canonical_aliases.CanonicalAliasEnvironment[source]#
Bases:
object
An environment that defines a set of canonical aliases.
- Variables:
aliases (dict[int, penzai.treescope.canonical_aliases.ModuleAttributePath]) – A mapping from id(some_object) to the path where we expect to find that object.
lazy_populate_if_imported (list[tuple[str, Callable[[Any, penzai.treescope.canonical_aliases.ModuleAttributePath], bool]]]) – A list of module names we should populate lazily if they are imported, without importing them directly, along with a predicate to use for them.
Methods
__init__
(aliases, lazy_populate_if_imported)Attributes
aliases
lazy_populate_if_imported