Typing fixes

Strict pyright mode results in a lot of issues regarding non fully
determined types, due to Generics. These are some issues I came across
today. We are still far from being clean on pyright.
This commit is contained in:
David Soria Parra 2024-10-11 10:55:55 +01:00
commit 04ad96e6cd
No known key found for this signature in database

View file

@ -7,10 +7,9 @@ from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStre
from mcp_python.types import JSONRPCMessage
@asynccontextmanager
async def stdio_server(
stdin: anyio.AsyncFile | None = None, stdout: anyio.AsyncFile | None = None
stdin: anyio.AsyncFile[str] | None = None, stdout: anyio.AsyncFile[str] | None = None
):
"""
Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.