mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
adjust the run_hook api to no longer take Hook
This commit is contained in:
parent
48ae18a2cb
commit
628c876b2d
26 changed files with 163 additions and 192 deletions
|
|
@ -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]:
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue