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

Method find_spec

Lib/test/test_importlib/util.py:270–278  ·  view source on GitHub ↗
(self, fullname, path=None, parent=None)

Source from the content-addressed store, hash-verified

268 """Importer mock using PEP 451 APIs."""
269
270 def find_spec(self, fullname, path=None, parent=None):
271 try:
272 module = self.modules[fullname]
273 except KeyError:
274 return None
275 spec = util.spec_from_file_location(
276 fullname, module.__file__, loader=self,
277 submodule_search_locations=getattr(module, '__path__', None))
278 return spec
279
280 def create_module(self, spec):
281 if spec.name not in self.modules:

Calls 1

getattrFunction · 0.85