@@ -31,7 +31,7 @@ async def async_wrapper(self, *args, **kwargs):
3131 require_auth = kwargs .get ('require_auth' , True )
3232 if not require_auth :
3333 return await func (self , * args , ** kwargs )
34-
34+
3535 try :
3636 return await func (self , * args , ** kwargs )
3737 except BasalamAuthError :
@@ -45,7 +45,7 @@ def sync_wrapper(self, *args, **kwargs):
4545 require_auth = kwargs .get ('require_auth' , True )
4646 if not require_auth :
4747 return func (self , * args , ** kwargs )
48-
48+
4949 try :
5050 return func (self , * args , ** kwargs )
5151 except BasalamAuthError :
@@ -104,10 +104,11 @@ def _get_headers(self, custom_headers: Optional[Dict[str, str]] = None) -> Dict[
104104
105105 return headers
106106
107- async def _get_client (self , custom_headers : Optional [Dict [str , str ]] = None , require_auth : bool = True ) -> httpx .AsyncClient :
107+ async def _get_client (self , custom_headers : Optional [Dict [str , str ]] = None ,
108+ require_auth : bool = True ) -> httpx .AsyncClient :
108109 """Get an async HTTP client with proper configuration."""
109110 headers = self ._get_headers (custom_headers )
110-
111+
111112 if require_auth :
112113 auth_headers = await self .auth .get_auth_headers ()
113114 headers .update (auth_headers )
@@ -118,10 +119,11 @@ async def _get_client(self, custom_headers: Optional[Dict[str, str]] = None, req
118119 follow_redirects = True ,
119120 )
120121
121- def _get_client_sync (self , custom_headers : Optional [Dict [str , str ]] = None , require_auth : bool = True ) -> httpx .Client :
122+ def _get_client_sync (self , custom_headers : Optional [Dict [str , str ]] = None ,
123+ require_auth : bool = True ) -> httpx .Client :
122124 """Get a synchronous HTTP client with proper configuration."""
123125 headers = self ._get_headers (custom_headers )
124-
126+
125127 if require_auth :
126128 auth_headers = self .auth .get_auth_headers_sync ()
127129 headers .update (auth_headers )
@@ -259,7 +261,8 @@ async def _get(
259261 require_auth : bool = True ,
260262 ) -> Union [Dict [str , Any ], List [Dict [str , Any ]], T ]:
261263 """Make a GET request."""
262- return await self .request ("GET" , path , params = params , headers = headers , response_model = response_model , require_auth = require_auth )
264+ return await self .request ("GET" , path , params = params , headers = headers , response_model = response_model ,
265+ require_auth = require_auth )
263266
264267 def _get_sync (
265268 self ,
@@ -270,7 +273,8 @@ def _get_sync(
270273 require_auth : bool = True ,
271274 ) -> Union [Dict [str , Any ], List [Dict [str , Any ]], T ]:
272275 """Make a synchronous GET request."""
273- return self .request_sync ("GET" , path , params = params , headers = headers , response_model = response_model , require_auth = require_auth )
276+ return self .request_sync ("GET" , path , params = params , headers = headers , response_model = response_model ,
277+ require_auth = require_auth )
274278
275279 async def _post (
276280 self ,
@@ -359,7 +363,8 @@ async def _delete(
359363 require_auth : bool = True ,
360364 ) -> Union [Dict [str , Any ], List [Dict [str , Any ]], T ]:
361365 """Make a DELETE request."""
362- return await self .request ("DELETE" , path , params = params , headers = headers , response_model = response_model , require_auth = require_auth )
366+ return await self .request ("DELETE" , path , params = params , headers = headers , response_model = response_model ,
367+ require_auth = require_auth )
363368
364369 def _delete_sync (
365370 self ,
@@ -370,4 +375,5 @@ def _delete_sync(
370375 require_auth : bool = True ,
371376 ) -> Union [Dict [str , Any ], List [Dict [str , Any ]], T ]:
372377 """Make a synchronous DELETE request."""
373- return self .request_sync ("DELETE" , path , params = params , headers = headers , response_model = response_model , require_auth = require_auth )
378+ return self .request_sync ("DELETE" , path , params = params , headers = headers , response_model = response_model ,
379+ require_auth = require_auth )
0 commit comments