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

Function _read_state

pre_commit/repository.py:37–43  ·  view source on GitHub ↗
(venv: str)

Source from the content-addressed store, hash-verified

35
36
37def _read_state(venv: str) -> object | None:
38 filename = _state_filename_v1(venv)
39 if not os.path.exists(filename):
40 return None
41 else:
42 with open(filename) as f:
43 return json.load(f)
44
45
46def _hook_installed(hook: Hook) -> bool:

Callers 1

_hook_installedFunction · 0.85

Calls 2

_state_filename_v1Function · 0.85
existsMethod · 0.80

Tested by

no test coverage detected