Skip to content

Commit 8a2e856

Browse files
author
g97iulio1609
committed
style: apply ruff format
1 parent 07b2613 commit 8a2e856

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/mcp/server/stdio.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@ async def stdio_server(stdin: anyio.AsyncFile[str] | None = None, stdout: anyio.
4040
# python is platform-dependent (Windows is particularly problematic), so we
4141
# re-wrap the underlying binary stream to ensure UTF-8.
4242
if not stdin:
43-
stdin = anyio.wrap_file(
44-
TextIOWrapper(os.fdopen(os.dup(sys.stdin.fileno()), "rb"), encoding="utf-8")
45-
)
43+
stdin = anyio.wrap_file(TextIOWrapper(os.fdopen(os.dup(sys.stdin.fileno()), "rb"), encoding="utf-8"))
4644
if not stdout:
47-
stdout = anyio.wrap_file(
48-
TextIOWrapper(os.fdopen(os.dup(sys.stdout.fileno()), "wb"), encoding="utf-8")
49-
)
45+
stdout = anyio.wrap_file(TextIOWrapper(os.fdopen(os.dup(sys.stdout.fileno()), "wb"), encoding="utf-8"))
5046

5147
read_stream: MemoryObjectReceiveStream[SessionMessage | Exception]
5248
read_stream_writer: MemoryObjectSendStream[SessionMessage | Exception]

0 commit comments

Comments
 (0)