diff --git a/app/api/health.py b/app/api/health.py index d63031b..4990281 100644 --- a/app/api/health.py +++ b/app/api/health.py @@ -15,7 +15,7 @@ router = APIRouter() @router.get("/redis", status_code=status.HTTP_200_OK) async def redis_check( request: Request, - pyprofile: Annotated[ + pyprofile: Annotated[ # noqa: ARG001 bool, Query(description="Enable profiler for this request") ] = False, ): diff --git a/app/main.py b/app/main.py index d961dc6..801393d 100644 --- a/app/main.py +++ b/app/main.py @@ -48,9 +48,9 @@ async def lifespan(app: FastAPI): middleware = [ - Middleware(GZipMiddleware), - Middleware(ProfilingMiddleware), - ] + Middleware(GZipMiddleware), + Middleware(ProfilingMiddleware), +] def create_app() -> FastAPI: @@ -78,8 +78,6 @@ def create_app() -> FastAPI: # Register exception handlers register_exception_handlers(app) - - @app.get("/index", response_class=HTMLResponse) def get_index(request: Request): return templates.TemplateResponse("index.html", {"request": request}) diff --git a/app/middleware/profiler.py b/app/middleware/profiler.py index bab4165..c1c978e 100644 --- a/app/middleware/profiler.py +++ b/app/middleware/profiler.py @@ -25,4 +25,4 @@ class ProfilingMiddleware(BaseHTTPMiddleware): headers={"Content-Disposition": "attachment; filename=profile.html"}, ) - return await call_next(request) \ No newline at end of file + return await call_next(request) diff --git a/tests/conftest.py b/tests/conftest.py index 25b3a50..f706aec 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,6 +21,7 @@ from app.redis import get_redis def anyio_backend(request): return request.param + def _create_db(conn) -> None: """Create the test database if it doesn't exist.""" try: