🚨 Made linter happy
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
from fastapi import APIRouter, Request, HTTPException, Response
|
||||
from classquiz.config import settings
|
||||
|
||||
from authlib.integrations.starlette_client import OAuth
|
||||
from classquiz.db.models import User, UserAuthTypes
|
||||
from pydantic import BaseModel, ValidationError
|
||||
from classquiz.auth import check_token, credentials_exception
|
||||
from pydantic import BaseModel
|
||||
from classquiz.auth import check_token
|
||||
from classquiz.oauth.authenticate_user import log_user_in, rememberme_check
|
||||
from datetime import datetime
|
||||
from classquiz.oauth.init_oauth import init_oauth
|
||||
|
||||
@@ -3,7 +3,7 @@ from classquiz.config import settings
|
||||
|
||||
from classquiz.db.models import User, UserAuthTypes
|
||||
from pydantic import BaseModel, ValidationError
|
||||
from classquiz.auth import check_token, credentials_exception
|
||||
from classquiz.auth import check_token
|
||||
from classquiz.oauth.authenticate_user import log_user_in, rememberme_check
|
||||
from classquiz.oauth.init_oauth import init_oauth
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import os
|
||||
import ormar
|
||||
from email_validator import validate_email, EmailNotValidError
|
||||
from fastapi import APIRouter, Response, HTTPException, Request, Depends, status
|
||||
from datetime import timedelta, datetime
|
||||
from fastapi.background import BackgroundTasks
|
||||
from fastapi.responses import JSONResponse, RedirectResponse
|
||||
from fastapi.security import OAuth2PasswordRequestForm
|
||||
@@ -15,7 +14,6 @@ from classquiz.auth import (
|
||||
get_password_hash,
|
||||
verify_password,
|
||||
authenticate_user,
|
||||
create_access_token,
|
||||
get_current_user,
|
||||
)
|
||||
from classquiz.cache import clear_cache_for_account
|
||||
@@ -44,7 +42,7 @@ router.include_router(oauth.router, tags=["users", "oauth"], prefix="/oauth")
|
||||
|
||||
@router.post(
|
||||
"/create",
|
||||
# response_model=User,
|
||||
response_model=User,
|
||||
response_model_include={"id": ..., "verified": ..., "email": ...},
|
||||
)
|
||||
async def create_user(user: route_user, background_task: BackgroundTasks) -> User | JSONResponse:
|
||||
|
||||
@@ -2,7 +2,6 @@ import uuid
|
||||
|
||||
import pytest
|
||||
from redis import Redis
|
||||
from classquiz.db import models
|
||||
from classquiz.config import settings
|
||||
from classquiz.tests import test_user_email, test_user_password
|
||||
from classquiz.tests import test_client, example_quiz, ValueStorage # noqa : F401
|
||||
|
||||
Reference in New Issue
Block a user