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

Method _path_hooks

Lib/importlib/_bootstrap_external.py:1221–1231  ·  view source on GitHub ↗

Search sys.path_hooks for a finder for 'path'.

(path)

Source from the content-addressed store, hash-verified

1219
1220 @staticmethod
1221 def _path_hooks(path):
1222 """Search sys.path_hooks for a finder for 'path'."""
1223 if sys.path_hooks is not None and not sys.path_hooks:
1224 _warnings.warn('sys.path_hooks is empty', ImportWarning)
1225 for hook in sys.path_hooks:
1226 try:
1227 return hook(path)
1228 except ImportError:
1229 continue
1230 else:
1231 return None
1232
1233 @classmethod
1234 def _path_importer_cache(cls, path):

Callers 1

_path_importer_cacheMethod · 0.45

Calls 2

hookFunction · 0.85
warnMethod · 0.45

Tested by

no test coverage detected