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

Function in_env

pre_commit/languages/swift.py:30–33  ·  view source on GitHub ↗
(prefix: Prefix, version: str)

Source from the content-addressed store, hash-verified

28
29@contextlib.contextmanager # pragma: win32 no cover
30def in_env(prefix: Prefix, version: str) -> Generator[None]:
31 envdir = lang_base.environment_dir(prefix, ENVIRONMENT_DIR, version)
32 with envcontext(get_env_patch(envdir)):
33 yield
34
35
36def install_environment(

Callers

nothing calls this directly

Calls 2

envcontextFunction · 0.90
get_env_patchFunction · 0.70

Tested by

no test coverage detected