MCPcopy Index your code
hub / github.com/RustPython/RustPython / find_module

Method find_module

Lib/modulefinder.py:478–494  ·  view source on GitHub ↗
(self, name, path, parent=None)

Source from the content-addressed store, hash-verified

476 return m
477
478 def find_module(self, name, path, parent=None):
479 if parent is not None:
480 # assert path is not None
481 fullname = parent.__name__+'.'+name
482 else:
483 fullname = name
484 if fullname in self.excludes:
485 self.msgout(3, "find_module -> Excluded", fullname)
486 raise ImportError(name)
487
488 if path is None:
489 if name in sys.builtin_module_names:
490 return (None, None, ("", "", _C_BUILTIN))
491
492 path = self.path
493
494 return _find_module(name, path)
495
496 def report(self):
497 """Print a report to stdout, listing the found modules with their

Callers 2

import_moduleMethod · 0.95
load_packageMethod · 0.95

Calls 2

msgoutMethod · 0.95
_find_moduleFunction · 0.85

Tested by

no test coverage detected