diff options
author | Frederick Muriuki Muriithi | 2024-08-08 15:30:42 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-08-08 15:30:42 -0500 |
commit | c5fd5ac4e1048889f45aa61ee9603c684c2ea909 (patch) | |
tree | c590c13c71f4f4836acf610c250cf35fd1b1481b | |
parent | 06a760328a8ae9cb6d89a5ecc64c4e3281cb9bf1 (diff) | |
download | gn-uploader-c5fd5ac4e1048889f45aa61ee9603c684c2ea909.tar.gz |
Fix linting issues.
-rw-r--r-- | uploader/authorisation.py | 2 | ||||
-rw-r--r-- | uploader/db_utils.py | 2 | ||||
-rw-r--r-- | uploader/oauth2/client.py | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/uploader/authorisation.py b/uploader/authorisation.py index efd4dbd..8ab83f8 100644 --- a/uploader/authorisation.py +++ b/uploader/authorisation.py @@ -1,11 +1,9 @@ """Authorisation utilities.""" from functools import wraps -from urllib.parse import urljoin from flask import flash, redirect from uploader import session -from uploader.oauth2.client import oauth2_client, authserver_uri def require_login(function): """Check that the user is logged in before executing `func`.""" diff --git a/uploader/db_utils.py b/uploader/db_utils.py index 357b3da..5b79762 100644 --- a/uploader/db_utils.py +++ b/uploader/db_utils.py @@ -3,7 +3,7 @@ import logging import traceback import contextlib from urllib.parse import urlparse -from typing import Any, Tuple, Optional, Iterator, Callable +from typing import Any, Tuple, Iterator, Callable import MySQLdb as mdb from redis import Redis diff --git a/uploader/oauth2/client.py b/uploader/oauth2/client.py index 6dde9cb..a3e4ba3 100644 --- a/uploader/oauth2/client.py +++ b/uploader/oauth2/client.py @@ -88,14 +88,14 @@ def oauth2_client(): """Update the token when refreshed.""" session.set_user_token(token) - def __json_auth__(client, method, uri, headers, body): + def __json_auth__(client, _method, uri, headers, body): return ( uri, {**headers, "Content-Type": "application/json"}, json.dumps({ **dict(url_decode(body)), - "client_id": oauth2_clientid(), - "client_secret": oauth2_clientsecret() + "client_id": client.client_id, + "client_secret": client.client_secret })) def __client__(token) -> OAuth2Session: |