We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c51782c commit 96313f2Copy full SHA for 96313f2
myserver.py
@@ -1,5 +1,6 @@
1
from contextlib import asynccontextmanager
2
from pathlib import Path
3
+from typing import Any, AsyncGenerator
4
5
from fastmcp import FastMCP
6
@@ -8,7 +9,7 @@
8
9
10
# Define lifespan context manager
11
@asynccontextmanager
-async def lifespan(mcp: FastMCP) -> None:
12
+async def lifespan(mcp: FastMCP) -> AsyncGenerator[None, Any]:
13
print("Starting up...")
14
print(mcp.name)
15
# Do startup work here (connect to DB, initialize cache, etc.)
0 commit comments