adjust the run_hook api to no longer take Hook

This commit is contained in:
Anthony Sottile 2023-01-16 16:34:01 -05:00
parent 48ae18a2cb
commit 628c876b2d
26 changed files with 163 additions and 192 deletions

View file

@ -4,7 +4,6 @@ from typing import ContextManager
from typing import Protocol
from typing import Sequence
from pre_commit.hook import Hook
from pre_commit.languages import conda
from pre_commit.languages import coursier
from pre_commit.languages import dart
@ -62,8 +61,12 @@ class Language(Protocol):
# execute a hook and return the exit code and output
def run_hook(
self,
hook: Hook,
prefix: Prefix,
entry: str,
args: Sequence[str],
file_args: Sequence[str],
*,
require_serial: bool,
color: bool,
) -> tuple[int, bytes]:
...