Skip to content

Commit

Permalink
Improve linting
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Jun 10, 2024
1 parent 6c7716b commit 7416917
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion egi_notebooks_hub/egiauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ async def jwt_authenticate(self, handler, data=None):
refresh_token = data.get("refresh_token", None)
if self.enable_auth_state and not refresh_token:
self.log.debug(
"Refresh token was empty, will try to pull refresh_token from previous auth_state"
"Refresh token was empty, will try to pull refresh_token from "
"previous auth_state"
)
refresh_token = await self.get_prev_refresh_token(handler, username)
if refresh_token:
Expand Down
6 changes: 1 addition & 5 deletions egi_notebooks_hub/services/api_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from typing import Union

from fastapi import FastAPI, Request
import httpx
from fastapi import FastAPI, Request

app = FastAPI()

Expand Down Expand Up @@ -33,8 +31,6 @@ async def api_wrapper(request: Request, svc_path: str):
user_token = r.json()
# assume we have the user_token here
api_path = svc_path.removeprefix(PREFIX)
print(svc_path)
print(api_path)
async with httpx.AsyncClient() as client:
# which headers do we need to preserve?
headers = {"Authorization": f"token {user_token['token']}"}
Expand Down

0 comments on commit 7416917

Please sign in to comment.