Merging upstream version 3.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
eda8b2e628
commit
689b24add1
31 changed files with 215 additions and 350 deletions
|
@ -3,7 +3,6 @@ from __future__ import annotations
|
|||
import os
|
||||
from typing import Sequence
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.languages.all import Language
|
||||
from pre_commit.prefix import Prefix
|
||||
|
||||
|
@ -14,13 +13,16 @@ def run_language(
|
|||
exe: str,
|
||||
args: Sequence[str] = (),
|
||||
file_args: Sequence[str] = (),
|
||||
version: str = C.DEFAULT,
|
||||
version: str | None = None,
|
||||
deps: Sequence[str] = (),
|
||||
is_local: bool = False,
|
||||
) -> tuple[int, bytes]:
|
||||
prefix = Prefix(str(path))
|
||||
version = version or language.get_default_version()
|
||||
|
||||
language.install_environment(prefix, version, deps)
|
||||
health_error = language.health_check(prefix, version)
|
||||
assert health_error is None, health_error
|
||||
with language.in_env(prefix, version):
|
||||
ret, out = language.run_hook(
|
||||
prefix,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue