pre-commit/pre_commit/tool_base.py
Anthony Sottile 37e2ba87a7 wip
2025-11-07 17:02:17 -05:00

16 lines
514 B
Python

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?