MCPcopy Index your code
hub / github.com/httpie/cli / _load_directories

Function _load_directories

httpie/plugins/manager.py:28–38  ·  view source on GitHub ↗
(site_dirs: Iterable[Path])

Source from the content-addressed store, hash-verified

26
27@contextmanager
28def _load_directories(site_dirs: Iterable[Path]) -> Iterator[None]:
29 plugin_dirs = [
30 os.fspath(site_dir)
31 for site_dir in site_dirs
32 ]
33 sys.path.extend(plugin_dirs)
34 try:
35 yield
36 finally:
37 for plugin_dir in plugin_dirs:
38 sys.path.remove(plugin_dir)
39
40
41def enable_plugins(plugins_dir: Optional[Path]) -> ContextManager[None]:

Callers 1

enable_pluginsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected