1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

Update black

This commit is contained in:
thatmattlove
2021-12-06 17:12:30 -07:00
parent ec28ccafbc
commit c049569cab
27 changed files with 236 additions and 158 deletions

View File

@@ -20,7 +20,8 @@ async def http_handler(request, exc):
"""Handle web server errors."""
return JSONResponse(
{"output": exc.detail, "level": "danger", "keywords": []}, status_code=exc.status_code,
{"output": exc.detail, "level": "danger", "keywords": []},
status_code=exc.status_code,
)
@@ -36,5 +37,6 @@ async def validation_handler(request, exc):
"""Handle Pydantic validation errors raised by FastAPI."""
error = exc.errors()[0]
return JSONResponse(
{"output": error["msg"], "level": "error", "keywords": error["loc"]}, status_code=422,
{"output": error["msg"], "level": "error", "keywords": error["loc"]},
status_code=422,
)