Merging upstream version 3.0.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
962b6a60c2
commit
3904671ae3
107 changed files with 1775 additions and 2323 deletions
|
@ -2,20 +2,31 @@ from __future__ import annotations
|
|||
|
||||
from typing import Sequence
|
||||
|
||||
from pre_commit.hook import Hook
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit.languages.docker import docker_cmd
|
||||
from pre_commit.prefix import Prefix
|
||||
|
||||
ENVIRONMENT_DIR = None
|
||||
get_default_version = helpers.basic_get_default_version
|
||||
health_check = helpers.basic_health_check
|
||||
install_environment = helpers.no_install
|
||||
in_env = helpers.no_env
|
||||
|
||||
|
||||
def run_hook(
|
||||
hook: Hook,
|
||||
prefix: Prefix,
|
||||
entry: str,
|
||||
args: Sequence[str],
|
||||
file_args: Sequence[str],
|
||||
*,
|
||||
is_local: bool,
|
||||
require_serial: bool,
|
||||
color: bool,
|
||||
) -> tuple[int, bytes]: # pragma: win32 no cover
|
||||
cmd = docker_cmd() + hook.cmd
|
||||
return helpers.run_xargs(hook, cmd, file_args, color=color)
|
||||
cmd = docker_cmd() + helpers.hook_cmd(entry, args)
|
||||
return helpers.run_xargs(
|
||||
cmd,
|
||||
file_args,
|
||||
require_serial=require_serial,
|
||||
color=color,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue