Skip to content

Commit 33dba97

Browse files
Commit from GitHub Actions (Reformat code)
1 parent 637f961 commit 33dba97

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

app/core/db.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
Database
33
"""
44

5-
from sqlalchemy.ext.asyncio import AsyncEngine, async_sessionmaker, create_async_engine
5+
from sqlalchemy.ext.asyncio import (AsyncEngine, async_sessionmaker,
6+
create_async_engine)
67
from sqlmodel.ext.asyncio.session import AsyncSession
78

89
from app import repositories as repos

app/core/deps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from fastapi.security import APIKeyHeader
99

1010
from app.core.db import Database, SessionLocal
11-
from app.logic import Logic
1211
from app.core.security import Security
12+
from app.logic import Logic
1313
from app.models.user import User
1414

1515

@@ -30,7 +30,7 @@ async def get_logic(
3030

3131

3232
async def get_current_user(
33-
token: Annotated[str, Depends(APIKeyHeader(name="access-token"))],
33+
token: Annotated[str, Depends(APIKeyHeader(name='access-token'))],
3434
logic: Annotated[Logic, Depends(get_logic)],
3535
) -> User | None:
3636
return await logic.users.retrieve_by_token(token)

app/core/exps.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
from fastapi import HTTPException, status
66

77
# Users
8-
USER_EXISTS = HTTPException(status.HTTP_409_CONFLICT, "User is already taken.")
9-
USER_NOT_FOUND = HTTPException(status.HTTP_404_NOT_FOUND, "User not found.")
8+
USER_EXISTS = HTTPException(status.HTTP_409_CONFLICT, 'User is already taken.')
9+
USER_NOT_FOUND = HTTPException(status.HTTP_404_NOT_FOUND, 'User not found.')
1010
USER_IS_CORRECT = HTTPException(
11-
status.HTTP_401_UNAUTHORIZED, "User is correct.")
11+
status.HTTP_401_UNAUTHORIZED, 'User is correct.'
12+
)
1213

1314
# Tokens
14-
TOKEN_INVALID = HTTPException(status.HTTP_401_UNAUTHORIZED, "Invalid token.")
15-
TOKEN_EXPIRED = HTTPException(status.HTTP_401_UNAUTHORIZED, "Token expired.")
15+
TOKEN_INVALID = HTTPException(status.HTTP_401_UNAUTHORIZED, 'Invalid token.')
16+
TOKEN_EXPIRED = HTTPException(status.HTTP_401_UNAUTHORIZED, 'Token expired.')

app/logic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ def __init__(self, db: Database, security: Security):
99
self.users = Users(db, security)
1010

1111

12-
__all__ = ["Logic"]
12+
__all__ = ['Logic']

0 commit comments

Comments
 (0)