mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
adjust the run_hook api to no longer take Hook
This commit is contained in:
parent
48ae18a2cb
commit
628c876b2d
26 changed files with 163 additions and 192 deletions
|
|
@ -190,7 +190,14 @@ def _run_single_hook(
|
|||
time_before = time.time()
|
||||
language = languages[hook.language]
|
||||
with language.in_env(hook.prefix, hook.language_version):
|
||||
retcode, out = language.run_hook(hook, filenames, use_color)
|
||||
retcode, out = language.run_hook(
|
||||
hook.prefix,
|
||||
hook.entry,
|
||||
hook.args,
|
||||
filenames,
|
||||
require_serial=hook.require_serial,
|
||||
color=use_color,
|
||||
)
|
||||
duration = round(time.time() - time_before, 2) or 0
|
||||
diff_after = _get_diff()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue