mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 12:30:08 -06:00
Implement a simplified xargs in python
This commit is contained in:
@@ -10,6 +10,7 @@ from pre_commit.envcontext import UNSET
|
||||
from pre_commit.envcontext import Var
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit.util import clean_path_on_failure
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = 'py_env'
|
||||
@@ -80,6 +81,4 @@ def install_environment(
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
with in_env(repo_cmd_runner, hook['language_version']):
|
||||
return helpers.run_hook(
|
||||
(hook['entry'],) + tuple(hook['args']), file_args,
|
||||
)
|
||||
return xargs((hook['entry'],) + tuple(hook['args']), file_args)
|
||||
|
||||
Reference in New Issue
Block a user