From 87f988ea5e6ab35610e49947fbe326d1468e6060 Mon Sep 17 00:00:00 2001 From: Sourcery AI Date: Fri, 26 Jan 2024 09:57:43 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- ollama_python/endpoints/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ollama_python/endpoints/base.py b/ollama_python/endpoints/base.py index 2eb7623..bc7a27a 100644 --- a/ollama_python/endpoints/base.py +++ b/ollama_python/endpoints/base.py @@ -18,9 +18,7 @@ def _format_base_url(self, base_url: str) -> str: :param base_url: The base URL to format :return: The formatted base URL """ - if base_url.endswith("/"): - base_url = base_url[:-1] - return base_url + return base_url.removesuffix("/") def _stream( self, endpoint: str, parameters: dict, return_type: Optional[Callable] = None