From d362204cd8e8c5a7d0f94826938166126a9c70b6 Mon Sep 17 00:00:00 2001 From: Matt <77928207+mattzcarey@users.noreply.github.com> Date: Wed, 14 Jun 2023 17:40:16 +0100 Subject: [PATCH] chore: add types --- .vscode/settings.json | 5 +++-- backend/auth/auth_bearer.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1bb4e1d7d..403534473 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,8 +2,9 @@ "[python]": { "editor.defaultFormatter": "ms-python.autopep8" }, - "python.formatting.provider": "none", + "python.formatting.provider": "black", "editor.codeActionsOnSave": { "source.organizeImports": true - } + }, + "python.linting.enabled": true } diff --git a/backend/auth/auth_bearer.py b/backend/auth/auth_bearer.py index 33a45886f..4fb051f05 100644 --- a/backend/auth/auth_bearer.py +++ b/backend/auth/auth_bearer.py @@ -25,7 +25,7 @@ class AuthBearer(HTTPBearer): elif not credentials: raise HTTPException(status_code=403, detail="Invalid authorization code.") - async def authenticate(self, token, commons): + async def authenticate(self, token: str, commons: CommonsDep): if os.environ.get("AUTHENTICATE") == "false": return self.get_test_user() elif verify_token(token):