MCPcopy Index your code
hub / github.com/python/cpython / _path_hooks

Method _path_hooks

Lib/importlib/_bootstrap_external.py:1199–1209  ·  view source on GitHub ↗

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

(path)

Source from the content-addressed store, hash-verified

1197
1198 @staticmethod
1199 def _path_hooks(path):
1200 """Search sys.path_hooks for a finder for 'path'."""
1201 if sys.path_hooks is not None and not sys.path_hooks:
1202 _warnings.warn('sys.path_hooks is empty', ImportWarning)
1203 for hook in sys.path_hooks:
1204 try:
1205 return hook(path)
1206 except ImportError:
1207 continue
1208 else:
1209 return None
1210
1211 @classmethod
1212 def _path_importer_cache(cls, path):

Callers 1

_path_importer_cacheMethod · 0.80

Calls 2

hookFunction · 0.50
warnMethod · 0.45

Tested by

no test coverage detected