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

Function _get_hook_no_install

tests/repository_test.py:49–55  ·  view source on GitHub ↗
(repo_config, store, hook_id)

Source from the content-addressed store, hash-verified

47
48
49def _get_hook_no_install(repo_config, store, hook_id):
50 config = {'repos': [repo_config]}
51 config = cfgv.validate(config, CONFIG_SCHEMA)
52 config = cfgv.apply_defaults(config, CONFIG_SCHEMA)
53 hooks = all_hooks(config, store)
54 hook, = (hook for hook in hooks if hook.id == hook_id)
55 return hook
56
57
58def _get_hook(repo_config, store, hook_id):

Callers 2

_get_hookFunction · 0.85

Calls 1

all_hooksFunction · 0.90

Tested by

no test coverage detected