mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
wip
This commit is contained in:
parent
65175f3cf3
commit
37e2ba87a7
13 changed files with 134 additions and 0 deletions
16
pre_commit/tool_base.py
Normal file
16
pre_commit/tool_base.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Protocol
|
||||
|
||||
from pre_commit.prefix import Prefix
|
||||
|
||||
|
||||
class Tool(Protocol):
|
||||
# "special" versions which can be resolved
|
||||
@property
|
||||
def RESOLVABLE(self) -> tuple[str, ...]: ...
|
||||
# TODO: what if not resolvable? (no current examples?)
|
||||
def resolve(self, version: str) -> str: ...
|
||||
def install(self, prefix: Prefix, version: str) -> None: ...
|
||||
def health_check(self, prefix: Prefix, version: str) -> str | None: ...
|
||||
# TODO: how to env patch?
|
||||
Loading…
Add table
Add a link
Reference in a new issue