hexrd.module_map module

class hexrd.module_map.ModuleAlias(current_path: list[str])[source]

Bases: object

class hexrd.module_map.ModuleAliasImporter[source]

Bases: MetaPathFinder, Loader

find_spec(fullname, path, target=None)[source]
load_module(fullname)[source]

This is a deprecated implementation path, but it is a lot easier to do override it this way than to override it with create and exec_module.

class hexrd.module_map.ModuleSpecWithParent(name, loader, *, origin=None, parent=None, is_package=False)[source]

Bases: ModuleSpec

property parent

The name of the module’s parent.

hexrd.module_map.get(alias: str) ModuleAlias | str | None[source]

Returns the the module or an alias to it if it exists.

hexrd.module_map.path_to_module(path: Path) str[source]

Convert a path to a module name.

e.g. * “package_remapper/remapper.py” -> “package_remapper.remapper” * “package_remapper/__init__.py” -> “package_remapper”