File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import io
6+ from collections .abc import AsyncIterator
67from contextlib import asynccontextmanager
8+ from typing import Any
79from unittest .mock import AsyncMock
810
911import anyio
@@ -17,14 +19,17 @@ async def test_run_stdio_async_passes_streams_to_stdio_server(monkeypatch: pytes
1719 captured : dict [str , object ] = {}
1820
1921 @asynccontextmanager
20- async def spy_stdio_server (stdin = None , stdout = None ):
22+ async def spy_stdio_server (
23+ stdin : anyio .AsyncFile [str ] | None = None ,
24+ stdout : anyio .AsyncFile [str ] | None = None ,
25+ ) -> AsyncIterator [tuple [AsyncMock , AsyncMock ]]:
2126 captured ["stdin" ] = stdin
2227 captured ["stdout" ] = stdout
2328 read_stream = AsyncMock ()
2429 write_stream = AsyncMock ()
2530 yield read_stream , write_stream
2631
27- async def noop_run (* _args , ** _kwargs ) :
32+ async def noop_run (* _args : Any , ** _kwargs : Any ) -> None :
2833 return None
2934
3035 monkeypatch .setattr ("mcp.server.mcpserver.server.stdio_server" , spy_stdio_server )
You can’t perform that action at this time.
0 commit comments