MCPcopy Create free account
hub / github.com/HexHive/NASS / __load

Method __load

tools/gef.py:5324–5331  ·  view source on GitHub ↗

Load a custom module, and return it.

(self)

Source from the content-addressed store, hash-verified

5322 return
5323
5324 def __load(self) -> ModuleType:
5325 """Load a custom module, and return it."""
5326 fpath = self.path
5327 spec = importlib.util.spec_from_file_location(fpath.stem, fpath)
5328 module = importlib.util.module_from_spec(spec)
5329 sys.modules[fpath.stem] = module
5330 spec.loader.exec_module(module)
5331 return module
5332
5333 def __str__(self) -> str:
5334 return self.name

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected