From 03555bf6114961573c6c3ec23c250fcb28a04bf9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:07:58 +0000 Subject: [PATCH] ci(pre-commit): auto fixes from pre-commit hooks --- src/aic/prompt/base.py | 3 +-- src/aic/provider/base.py | 12 ++++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/aic/prompt/base.py b/src/aic/prompt/base.py index ffc17c42..093d3b49 100644 --- a/src/aic/prompt/base.py +++ b/src/aic/prompt/base.py @@ -27,8 +27,7 @@ async def init( pathspec = [*pathspec, ":!.cspell.json", ":!*-lock.*", ":!*.lock"] self._diff = await _git.diff(pathspec) - async def ask(self) -> None: - ... + async def ask(self) -> None: ... @property @abc.abstractmethod diff --git a/src/aic/provider/base.py b/src/aic/provider/base.py index 02564609..ce2f1494 100644 --- a/src/aic/provider/base.py +++ b/src/aic/provider/base.py @@ -70,8 +70,7 @@ async def init(self, models: Sequence[str] | None = None) -> None: if models is not None: self.models = models - async def list_models(self) -> AsyncGenerator[Model, None]: - ... + async def list_models(self) -> AsyncGenerator[Model, None]: ... async def quota(self) -> tuple[float, str] | None: return None @@ -85,8 +84,7 @@ def pricing(self, model: str) -> Pricing | None: @abc.abstractmethod async def generate( self, prompt: _prompt.Prompt, *, truncate: bool = True - ) -> Response: - ... + ) -> Response: ... async def generate_stream( self, prompt: _prompt.Prompt, *, truncate: bool = True @@ -120,9 +118,7 @@ def select_model(self, prompt: _prompt.Prompt) -> str: return self.models[0] @abc.abstractmethod - def count_tokens(self, model: str, prompt: _prompt.Prompt) -> int: - ... + def count_tokens(self, model: str, prompt: _prompt.Prompt) -> int: ... @abc.abstractmethod - def truncate(self, model: str, prompt: _prompt.Prompt) -> _prompt.Prompt: - ... + def truncate(self, model: str, prompt: _prompt.Prompt) -> _prompt.Prompt: ...