MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / in_env

Function in_env

pre_commit/languages/rust.py:64–67  ·  view source on GitHub ↗
(prefix: Prefix, version: str)

Source from the content-addressed store, hash-verified

62
63@contextlib.contextmanager
64def in_env(prefix: Prefix, version: str) -> Generator[None]:
65 envdir = lang_base.environment_dir(prefix, ENVIRONMENT_DIR, version)
66 with envcontext(get_env_patch(envdir, version)):
67 yield
68
69
70def _add_dependencies(

Callers 1

install_environmentFunction · 0.70

Calls 2

envcontextFunction · 0.90
get_env_patchFunction · 0.70

Tested by

no test coverage detected