From 74e0a3a2d29659834ad45c90b0fcfb1f66682bbf Mon Sep 17 00:00:00 2001 From: Giuseppe Ambrosio Date: Thu, 5 Dec 2024 11:34:59 +0100 Subject: [PATCH] refactor(http-client): api_key, host_url required params --- focoos/utils/system.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/focoos/utils/system.py b/focoos/utils/system.py index bcd7871..7f2e35f 100644 --- a/focoos/utils/system.py +++ b/focoos/utils/system.py @@ -8,12 +8,10 @@ class HttpClient: def __init__( self, - api_key: Optional[str] = None, - host_url: str = FOCOOS_CONFIG.default_host_url, + api_key: str, + host_url: str, ): - if not api_key and not FOCOOS_CONFIG.focoos_api_key: - raise ValueError("API key is required") - self.api_key = api_key or FOCOOS_CONFIG.focoos_api_key + self.api_key = api_key self.host_url = host_url self.default_headers = {