From 83375dcdbee97af93a7cf9f20a1ef5b476c7015c Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 3 May 2024 21:41:49 -0400 Subject: [PATCH] Apply suggestions from code review --- fastapi/applications.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fastapi/applications.py b/fastapi/applications.py index f8a07aaf7..26074a78a 100644 --- a/fastapi/applications.py +++ b/fastapi/applications.py @@ -4524,9 +4524,8 @@ class FastAPI(Starlette): @app.middleware("http") async def add_process_time_header( - request: Request, - call_next: Callable[[Request], Awaitable[Response] - ) -> Response: + request: Request, call_next: Callable[[Request], Awaitable[Response]] + ) -> Response: start_time = time.time() response = await call_next(request) process_time = time.time() - start_time