From ed5a83301d1f6bab3ff03cb5009e903ce78540dd Mon Sep 17 00:00:00 2001 From: Kun Yang <10774721+ykun9@users.noreply.github.com> Date: Sun, 10 Aug 2025 21:52:52 +0900 Subject: [PATCH] fix(type): lifespan is partially unknown (#1389) Co-authored-by: Kun Yang <10774721+ykun91@users.noreply.github.com> --- src/fastmcp/server/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fastmcp/server/http.py b/src/fastmcp/server/http.py index 1e0978d62..13c13ea73 100644 --- a/src/fastmcp/server/http.py +++ b/src/fastmcp/server/http.py @@ -72,7 +72,7 @@ _current_http_request: ContextVar[Request | None] = ContextVar( class StarletteWithLifespan(Starlette): @property - def lifespan(self) -> Lifespan: + def lifespan(self) -> Lifespan[Starlette]: return self.router.lifespan_context