Skip to content

Commit b6931a4

Browse files
committed
pep8
1 parent 9ce73cb commit b6931a4

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

api_v1/exeptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ class ValidationError(HTTPException):
55
"""
66
Исключение вызванное проблемами с валидацией
77
"""
8-
8+
99
pass

api_v1/users/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717
async def get_user(
1818
session: AsyncSession = Depends(db_connection.session_geter),
19-
):
19+
):
2020
session = session
2121
raise ValidationError(status_code=status.HTTP_400_BAD_REQUEST,
2222
detail=dict(some='Some is wrong'))

app_includes/logs_errors.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
from fastapi import FastAPI, Request
32
from fastapi.responses import JSONResponse
43
from fastapi.exceptions import HTTPException
@@ -15,7 +14,7 @@ def register_errors(app: FastAPI) -> None:
1514
async def validation_error_handler(
1615
request: Request,
1716
exc: ValidationError,
18-
):
17+
):
1918
"""
2019
Логирование всех ValidationError
2120
"""
@@ -31,7 +30,7 @@ async def validation_error_handler(
3130
async def http_error_handler(
3231
request: Request,
3332
exc: HTTPException,
34-
):
33+
):
3534
"""
3635
Логирование всех HTTPException
3736
"""
@@ -47,7 +46,7 @@ async def http_error_handler(
4746
async def error_handler(
4847
request: Request,
4948
exc: Exception,
50-
):
49+
):
5150
"""
5251
Логирование всех Exception
5352
"""
@@ -63,7 +62,7 @@ async def error_handler(
6362
async def validation_error_handler(
6463
request: Request,
6564
exc: StarletteHTTPException,
66-
):
65+
):
6766
"""
6867
Логирование всех StarletteHTTPException
6968
"""

async_alembic/env.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
settings.db.url,
3434
)
3535

36+
3637
def run_migrations_offline() -> None:
3738
"""Run migrations in 'offline' mode.
3839

0 commit comments

Comments
 (0)