Skip to content

Commit 99727a9

Browse files
ruff format
1 parent 4f36581 commit 99727a9

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Diff for: src/mcp/client/stdio.py

+13-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ class StdioServerParameters(BaseModel):
7777
"""
7878
The text encoding error handler.
7979
80-
See https://docs.python.org/3/library/codecs.html#codec-base-classes for explanations of possible values
80+
See https://docs.python.org/3/library/codecs.html#codec-base-classes for
81+
explanations of possible values
8182
"""
8283

8384

@@ -108,7 +109,11 @@ async def stdout_reader():
108109
try:
109110
async with read_stream_writer:
110111
buffer = ""
111-
async for chunk in TextReceiveStream(process.stdout, encoding=server.encoding, errors=server.encoding_error_handler):
112+
async for chunk in TextReceiveStream(
113+
process.stdout,
114+
encoding=server.encoding,
115+
errors=server.encoding_error_handler,
116+
):
112117
lines = (buffer + chunk).split("\n")
113118
buffer = lines.pop()
114119

@@ -130,7 +135,12 @@ async def stdin_writer():
130135
async with write_stream_reader:
131136
async for message in write_stream_reader:
132137
json = message.model_dump_json(by_alias=True, exclude_none=True)
133-
await process.stdin.send((json + "\n").encode(encoding=server.encoding, errors=server.encoding_error_handler))
138+
await process.stdin.send(
139+
(json + "\n").encode(
140+
encoding=server.encoding,
141+
errors=server.encoding_error_handler,
142+
)
143+
)
134144
except anyio.ClosedResourceError:
135145
await anyio.lowlevel.checkpoint()
136146

0 commit comments

Comments
 (0)