From 61779135445d0690413ffca8232ad063a2d5b223 Mon Sep 17 00:00:00 2001 From: Javier Martinez Date: Wed, 11 Sep 2024 16:24:53 +0200 Subject: [PATCH] fix: mypy --- private_gpt/utils/ollama.py | 8 +++++++- private_gpt/utils/retry.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/private_gpt/utils/ollama.py b/private_gpt/utils/ollama.py index 5556f4b14..da9107bff 100644 --- a/private_gpt/utils/ollama.py +++ b/private_gpt/utils/ollama.py @@ -21,7 +21,13 @@ _JITTER = (3.0, 10.0) -@retry(is_async=False, exceptions=(ConnectError, ResponseError), tries=_MAX_RETRIES, jitter=_JITTER, logger=logger) +@retry( + is_async=False, + exceptions=(ConnectError, ResponseError), + tries=_MAX_RETRIES, + jitter=_JITTER, + logger=logger, +) def check_connection(client: Client) -> bool: try: client.list() diff --git a/private_gpt/utils/retry.py b/private_gpt/utils/retry.py index 5c877827a..614b6803d 100644 --- a/private_gpt/utils/retry.py +++ b/private_gpt/utils/retry.py @@ -28,4 +28,4 @@ def retry( jitter=jitter, logger=logger, ) - return wrapped # type: ignore \ No newline at end of file + return wrapped # type: ignore