From 023b9bf36a4305f5edceece7ac6eabbd16e2e40d Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Sat, 1 Jan 2022 12:02:10 -0600 Subject: Format using a more typical line length of 100 --- requests_cache/session.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'requests_cache/session.py') diff --git a/requests_cache/session.py b/requests_cache/session.py index 578e7c8..26c06e5 100644 --- a/requests_cache/session.py +++ b/requests_cache/session.py @@ -198,7 +198,11 @@ class CacheMixin(MIXIN_BASE): return set_response_defaults(response, actions.cache_key) def _resend( - self, request: PreparedRequest, actions: CacheActions, cached_response: CachedResponse, **kwargs + self, + request: PreparedRequest, + actions: CacheActions, + cached_response: CachedResponse, + **kwargs, ) -> AnyResponse: """Attempt to resend the request and cache the new response. If the request fails, delete the stale cache item. @@ -211,7 +215,11 @@ class CacheMixin(MIXIN_BASE): raise def _resend_and_ignore( - self, request: PreparedRequest, actions: CacheActions, cached_response: CachedResponse, **kwargs + self, + request: PreparedRequest, + actions: CacheActions, + cached_response: CachedResponse, + **kwargs, ) -> AnyResponse: """Attempt to resend the request and cache the new response. If there are any errors, ignore them and and return the stale cache item. @@ -223,7 +231,9 @@ class CacheMixin(MIXIN_BASE): response.raise_for_status() return response except Exception: - logger.warning(f'Request for URL {request.url} failed; using cached response', exc_info=True) + logger.warning( + f'Request for URL {request.url} failed; using cached response', exc_info=True + ) return cached_response def _update_revalidated_response( -- cgit v1.2.1