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

Function _read_pyvenv_cfg

pre_commit/languages/python.py:36–46  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

34
35
36def _read_pyvenv_cfg(filename: str) -> dict[str, str]:
37 ret = {}
38 with open(filename, encoding='UTF-8') as f:
39 for line in f:
40 try:
41 k, v = line.split('=')
42 except ValueError: # blank line / comment / etc.
43 continue
44 else:
45 ret[k.strip()] = v.strip()
46 return ret
47
48
49def bin_dir(venv: str) -> str:

Callers 1

health_checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected