INNER CODE UNIT · Python

debug

metatypedev/metatype · src/pyrt_wit_wire/main.py:147

    def debug(self):
        print("= Loaded modules summary == == == ==")
        print(f" modules: {self._mod_names}")
        print(f" packages: {self._pkg_names}")
        print("== == == == == == == == == == == ==")

    def __init__(self, modules: Dict[str, str]):
        self._mods_raw = modules
        self._pkgs = set()
        for path in self._mods_raw:
            dirname = os.path.dirname(path)
            while dirname != "/" and dirname != "" and dirname != ".":
                if dirname not in self._mods_raw:
                    self._pkgs.add(dirname)
                dirname = os.path.dirname(dirname)
        self._mod_names = {ThePathFinder.path_to_module(path): path for path in modules}
        self._pkg_names = {
            ThePathFinder.path_to_module(path): path for path in self._pkgs

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…