@@ -266,7 +266,8 @@ def post(self, url: str, **kwargs: Any) -> APIResponse:
266266
267267 Args:
268268 url: The request URL (absolute or relative to base_url).
269- **kwargs: Optional arguments: headers, params, data, form, json_data, timeout, max_redirects, fail_on_status_code.
269+ **kwargs: Optional arguments: headers, params, data, form,
270+ json_data, timeout, max_redirects, fail_on_status_code.
270271
271272 Returns:
272273 An APIResponse object.
@@ -278,7 +279,8 @@ def put(self, url: str, **kwargs: Any) -> APIResponse:
278279
279280 Args:
280281 url: The request URL (absolute or relative to base_url).
281- **kwargs: Optional arguments: headers, params, data, form, json_data, timeout, max_redirects, fail_on_status_code.
282+ **kwargs: Optional arguments: headers, params, data, form,
283+ json_data, timeout, max_redirects, fail_on_status_code.
282284
283285 Returns:
284286 An APIResponse object.
@@ -290,7 +292,8 @@ def patch(self, url: str, **kwargs: Any) -> APIResponse:
290292
291293 Args:
292294 url: The request URL (absolute or relative to base_url).
293- **kwargs: Optional arguments: headers, params, data, form, json_data, timeout, max_redirects, fail_on_status_code.
295+ **kwargs: Optional arguments: headers, params, data, form,
296+ json_data, timeout, max_redirects, fail_on_status_code.
294297
295298 Returns:
296299 An APIResponse object.
@@ -302,7 +305,8 @@ def delete(self, url: str, **kwargs: Any) -> APIResponse:
302305
303306 Args:
304307 url: The request URL (absolute or relative to base_url).
305- **kwargs: Optional arguments: headers, params, data, form, json_data, timeout, max_redirects, fail_on_status_code.
308+ **kwargs: Optional arguments: headers, params, data, form,
309+ json_data, timeout, max_redirects, fail_on_status_code.
306310
307311 Returns:
308312 An APIResponse object.
@@ -314,7 +318,8 @@ def head(self, url: str, **kwargs: Any) -> APIResponse:
314318
315319 Args:
316320 url: The request URL (absolute or relative to base_url).
317- **kwargs: Optional arguments: headers, params, timeout, max_redirects, fail_on_status_code.
321+ **kwargs: Optional arguments: headers, params, timeout,
322+ max_redirects, fail_on_status_code.
318323
319324 Returns:
320325 An APIResponse object.
@@ -327,7 +332,8 @@ def fetch(self, url: str, method: str = "GET", **kwargs: Any) -> APIResponse:
327332 Args:
328333 url: The request URL (absolute or relative to base_url).
329334 method: The HTTP method to use.
330- **kwargs: Optional arguments: headers, params, data, form, json_data, timeout, max_redirects, fail_on_status_code.
335+ **kwargs: Optional arguments: headers, params, data, form,
336+ json_data, timeout, max_redirects, fail_on_status_code.
331337
332338 Returns:
333339 An APIResponse object.
@@ -393,7 +399,10 @@ def _execute_request(
393399
394400 follow = max_redirects > 0
395401 retries = Retry (
396- connect = 0 , read = 0 , status = 0 , other = 0 ,
402+ connect = 0 ,
403+ read = 0 ,
404+ status = 0 ,
405+ other = 0 ,
397406 redirect = max_redirects if follow else 0 ,
398407 raise_on_redirect = False ,
399408 )
@@ -666,8 +675,7 @@ def _handle_response_cookies(self, set_cookie_headers: list[str], url: str) -> N
666675 key = (cookie ["name" ], cookie .get ("domain" , "" ), cookie .get ("path" , "/" ))
667676 # Remove existing cookie with same key
668677 self ._cookies = [
669- c for c in self ._cookies
670- if (c .get ("name" ), c .get ("domain" , "" ), c .get ("path" , "/" )) != key
678+ c for c in self ._cookies if (c .get ("name" ), c .get ("domain" , "" ), c .get ("path" , "/" )) != key
671679 ]
672680 # Only store if not expired (Max-Age=0 or negative means delete)
673681 expiry = cookie .get ("expiry" )
0 commit comments