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

Function in_env

pre_commit/languages/conda.py:44–47  ·  view source on GitHub ↗
(prefix: Prefix, version: str)

Source from the content-addressed store, hash-verified

42
43@contextlib.contextmanager
44def in_env(prefix: Prefix, version: str) -> Generator[None]:
45 envdir = lang_base.environment_dir(prefix, ENVIRONMENT_DIR, version)
46 with envcontext(get_env_patch(envdir)):
47 yield
48
49
50def _conda_exe() -> str:

Callers

nothing calls this directly

Calls 2

envcontextFunction · 0.90
get_env_patchFunction · 0.70

Tested by

no test coverage detected