FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Apply suggestions from code review · codeaucafe/python-sdk@fc021ee · GitHub

Commit fc021ee

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

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎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
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)

Back | FazBrowse Home | New Git URL