From 8c909f1a5a887b9489c5bf175981b0139c684bac Mon Sep 17 00:00:00 2001 From: Winston Hsiao Date: Tue, 12 Nov 2024 11:50:41 -0500 Subject: [PATCH] Fix lint --- store/app/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/app/main.py b/store/app/main.py index 71797ef1..0b50cd83 100644 --- a/store/app/main.py +++ b/store/app/main.py @@ -3,7 +3,7 @@ import logging from contextlib import asynccontextmanager from pathlib import Path -from typing import AsyncGenerator, Callable +from typing import AsyncGenerator, Awaitable, Callable import uvicorn from fastapi import Depends, FastAPI, HTTPException, Request, status @@ -82,9 +82,9 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: @app.middleware("http") -async def log_requests(request: Request, call_next: Callable[[Request], Response]) -> Response: +async def log_requests(request: Request, call_next: Callable[[Request], Awaitable[Response]]) -> Response: logger.info(f"Request: {request.method} {request.url}") - response = call_next(request) + response = await call_next(request) logger.info(f"Response status: {response.status_code}") return response