Skip to content

Commit 96313f2

Browse files
committed
type annotation fix
1 parent c51782c commit 96313f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

myserver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from contextlib import asynccontextmanager
22
from pathlib import Path
3+
from typing import Any, AsyncGenerator
34

45
from fastmcp import FastMCP
56

@@ -8,7 +9,7 @@
89

910
# Define lifespan context manager
1011
@asynccontextmanager
11-
async def lifespan(mcp: FastMCP) -> None:
12+
async def lifespan(mcp: FastMCP) -> AsyncGenerator[None, Any]:
1213
print("Starting up...")
1314
print(mcp.name)
1415
# Do startup work here (connect to DB, initialize cache, etc.)

0 commit comments

Comments
 (0)