8000 Apply suggestions from code review · quick1snail/python-sdk@fc021ee · GitHub
[go: up one dir, main page]

Skip to content

Commit fc021ee

Browse files
calclaviaKludex
andauthored
Apply suggestions from code review
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
1 parent f67c3ee commit fc021ee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mcp/client/websocket.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ async def ws_reader():
5959
try:
6060
async for raw_text in ws:
6161
try:
62-
data = json.loads(raw_text)
63-
message = types.JSONRPCMessage.model_validate(data)
62+
message = types.JSONRPCMessage.model_validate_json(raw_text)
6463
4291 await read_stream_send.send(message)
6564
except Exception as exc:
6665
# If JSON parse or model validation fails, send the exception

0 commit comments

Comments
 (0)
0