diff --git a/web/participant-self-care/participant_self_care/app.py b/web/participant-self-care/participant_self_care/app.py index 37ff80c..f696cc2 100644 --- a/web/participant-self-care/participant_self_care/app.py +++ b/web/participant-self-care/participant_self_care/app.py @@ -1,22 +1,14 @@ -from collections.abc import AsyncGenerator -from contextlib import asynccontextmanager import pathlib import time +from collections.abc import AsyncGenerator +from contextlib import asynccontextmanager from typing import Any, Dict -from dotenv import load_dotenv from authlib.integrations.starlette_client import OAuth, OAuthError +from dotenv import load_dotenv from fastapi import Depends, FastAPI, Response from fastapi.staticfiles import StaticFiles from participant_self_care.tado_decorator import require_tado_auth -from rich import print -from starlette.config import Config -from starlette.middleware.sessions import SessionMiddleware -from starlette.requests import Request -from starlette.responses import HTMLResponse, RedirectResponse -from tadoclient.client import TadoClient -from tadoclient.models import TadoClientConfig, TadoToken - from participant_self_care.users.db import User, create_db_and_tables from participant_self_care.users.schemas import UserCreate, UserRead, UserUpdate from participant_self_care.users.users import ( @@ -24,6 +16,13 @@ current_active_user, fastapi_users, ) +from rich import print +from starlette.config import Config +from starlette.middleware.sessions import SessionMiddleware +from starlette.requests import Request +from starlette.responses import HTMLResponse, RedirectResponse +from tadoclient.client import TadoClient +from tadoclient.models import TadoClientConfig, TadoToken @asynccontextmanager diff --git a/web/participant-self-care/participant_self_care/users/users.py b/web/participant-self-care/participant_self_care/users/users.py index 4e86b31..ad50fbd 100644 --- a/web/participant-self-care/participant_self_care/users/users.py +++ b/web/participant-self-care/participant_self_care/users/users.py @@ -1,6 +1,6 @@ -from collections.abc import AsyncGenerator -import uuid import os +import uuid +from collections.abc import AsyncGenerator from typing import Optional from fastapi import Depends, Request, Response @@ -11,7 +11,6 @@ JWTStrategy, ) from fastapi_users.db import SQLAlchemyUserDatabase - from participant_self_care.users.db import User, get_user_db