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
|
|
@ -1,7 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import shlex
|
||||
from typing import Any
|
||||
from typing import NamedTuple
|
||||
from typing import Sequence
|
||||
|
|
@ -37,10 +36,6 @@ class Hook(NamedTuple):
|
|||
stages: Sequence[str]
|
||||
verbose: bool
|
||||
|
||||
@property
|
||||
def cmd(self) -> tuple[str, ...]:
|
||||
return (*shlex.split(self.entry), *self.args)
|
||||
|
||||
@property
|
||||
def install_key(self) -> tuple[Prefix, str, str, tuple[str, ...]]:
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue