Skip to content

Commit ba184a2

Browse files
committedMar 12, 2025··
Ruff
1 parent 2bcca39 commit ba184a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/mcp/client/websocket.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from typing import AsyncGenerator
55

66
import anyio
7+
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
78
from pydantic import ValidationError
89
from websockets.asyncio.client import connect as ws_connect
9-
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
1010
from websockets.typing import Subprotocol
1111

1212
import mcp.types as types
@@ -59,7 +59,8 @@ async def ws_reader():
5959

6060
async def ws_writer():
6161
"""
62-
Reads JSON-RPC messages from write_stream_reader and sends them to the server.
62+
Reads JSON-RPC messages from write_stream_reader and
63+
sends them to the server.
6364
"""
6465
async with write_stream_reader:
6566
async for message in write_stream_reader:

‎tests/shared/test_ws.py

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import uvicorn
99
from pydantic import AnyUrl
1010
from starlette.applications import Starlette
11-
from starlette.requests import Request
1211
from starlette.routing import WebSocketRoute
1312

1413
from mcp.client.session import ClientSession

0 commit comments

Comments
 (0)
Please sign in to comment.