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

Method find_spec

crates/wasm/Lib/whlimport.py:104–112  ·  view source on GitHub ↗
(cls, fullname, path=None, target=None)

Source from the content-addressed store, hash-verified

102
103 @classmethod
104 def find_spec(cls, fullname, path=None, target=None):
105 path = fullname.replace(".", "/")
106 for zname, z in cls._packages.items():
107 mi, fullpath = _get_module_info(z, path)
108 if mi is not None:
109 return _bootstrap.spec_from_loader(
110 fullname, cls, origin=f"zip:{zname}/{fullpath}", is_package=mi
111 )
112 return None
113
114 @classmethod
115 def create_module(cls, spec):

Callers 1

get_sourceMethod · 0.45

Calls 3

_get_module_infoFunction · 0.70
replaceMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected