Imports cleanup

This commit is contained in:
Profitroll 2023-06-22 13:26:01 +02:00
parent d2f3d7e687
commit b46f3fb0fd
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2
3 changed files with 33 additions and 14 deletions

View File

@ -9,7 +9,21 @@ from starlette.status import (
HTTP_422_UNPROCESSABLE_ENTITY, HTTP_422_UNPROCESSABLE_ENTITY,
) )
from classes.exceptions import * from classes.exceptions import (
AlbumNotFoundError,
AlbumAlreadyExistsError,
AlbumIncorrectError,
PhotoNotFoundError,
PhotoSearchQueryEmptyError,
VideoNotFoundError,
VideoSearchQueryEmptyError,
SearchPageInvalidError,
SearchTokenInvalidError,
AccessTokenInvalidError,
UserEmailCodeInvalid,
UserAlreadyExists,
UserCredentialsInvalid,
)
from modules.app import app from modules.app import app

View File

@ -1,4 +1,3 @@
import pickle
import re import re
from datetime import datetime, timedelta, timezone from datetime import datetime, timedelta, timezone
from os import makedirs, path, remove, system from os import makedirs, path, remove, system
@ -12,30 +11,37 @@ import aiofiles
from bson.errors import InvalidId from bson.errors import InvalidId
from bson.objectid import ObjectId from bson.objectid import ObjectId
from fastapi import Security, UploadFile from fastapi import Security, UploadFile
from fastapi.exceptions import HTTPException
from fastapi.responses import Response, UJSONResponse from fastapi.responses import Response, UJSONResponse
from jose import JWTError, jwt from jose import JWTError, jwt
from magic import Magic from magic import Magic
from plum.exceptions import UnpackError from plum.exceptions import UnpackError
from pydantic import ValidationError from pydantic import ValidationError
from pymongo import DESCENDING from pymongo import DESCENDING
from starlette.status import (HTTP_204_NO_CONTENT, HTTP_401_UNAUTHORIZED, from starlette.status import HTTP_204_NO_CONTENT, HTTP_409_CONFLICT
HTTP_409_CONFLICT)
from classes.exceptions import (AccessTokenInvalidError, from classes.exceptions import (
AlbumNameNotFoundError, PhotoNotFoundError, AccessTokenInvalidError,
PhotoSearchQueryEmptyError, AlbumNameNotFoundError,
SearchPageInvalidError, PhotoNotFoundError,
SearchTokenInvalidError) PhotoSearchQueryEmptyError,
SearchPageInvalidError,
SearchTokenInvalidError,
)
from classes.models import Photo, PhotoPublic, SearchResultsPhoto from classes.models import Photo, PhotoPublic, SearchResultsPhoto
from modules.app import app from modules.app import app
from modules.database import col_albums, col_photos, col_tokens from modules.database import col_albums, col_photos, col_tokens
from modules.exif_reader import extract_location from modules.exif_reader import extract_location
from modules.hasher import get_duplicates, get_phash from modules.hasher import get_duplicates, get_phash
from modules.scheduler import scheduler from modules.scheduler import scheduler
from modules.security import (ALGORITHM, SECRET_KEY, TokenData, User, from modules.security import (
create_access_token, get_current_active_user, ALGORITHM,
get_user) SECRET_KEY,
TokenData,
User,
create_access_token,
get_current_active_user,
get_user,
)
from modules.utils import configGet, logWrite from modules.utils import configGet, logWrite

View File

@ -1,4 +1,3 @@
import pickle
import re import re
from datetime import datetime, timezone from datetime import datetime, timezone
from os import makedirs, path, remove from os import makedirs, path, remove