From a7b796fa570642c7c8df67dffd1c336a0b7b9f9a Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Tue, 17 Nov 2020 15:39:21 +0530 Subject: [PATCH] Autoformat with black --- jupyterhub/handlers/base.py | 12 ++++++++---- jupyterhub/handlers/login.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/jupyterhub/handlers/base.py b/jupyterhub/handlers/base.py index dfd68d4e..bf580671 100644 --- a/jupyterhub/handlers/base.py +++ b/jupyterhub/handlers/base.py @@ -1477,10 +1477,14 @@ class UserUrlHandler(BaseHandler): # if request is expecting JSON, assume it's an API request and fail with 503 # because it won't like the redirect to the pending page - if get_accepted_mimetype( - self.request.headers.get('Accept', ''), - choices=['application/json', 'text/html'], - ) == 'application/json' or 'api' in user_path.split('/'): + if ( + get_accepted_mimetype( + self.request.headers.get('Accept', ''), + choices=['application/json', 'text/html'], + ) + == 'application/json' + or 'api' in user_path.split('/') + ): self._fail_api_request(user_name, server_name) return diff --git a/jupyterhub/handlers/login.py b/jupyterhub/handlers/login.py index 20be068d..6dd0ac08 100644 --- a/jupyterhub/handlers/login.py +++ b/jupyterhub/handlers/login.py @@ -79,7 +79,7 @@ class LogoutHandler(BaseHandler): async def get(self): """Log the user out, call the custom action, forward the user - to the logout page + to the logout page """ await self.default_handle_logout() await self.handle_logout()