mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
make in_env part of the language api
This commit is contained in:
parent
bcf0230772
commit
ae34a962d7
23 changed files with 73 additions and 92 deletions
|
|
@ -189,7 +189,8 @@ def _run_single_hook(
|
|||
filenames = ()
|
||||
time_before = time.time()
|
||||
language = languages[hook.language]
|
||||
retcode, out = language.run_hook(hook, filenames, use_color)
|
||||
with language.in_env(hook.prefix, hook.language_version):
|
||||
retcode, out = language.run_hook(hook, filenames, 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