Skip to content

Commit 41b8629

Browse files
author
g97iulio1609
committed
style: apply ruff format
1 parent 053d904 commit 41b8629

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
# after the server exits (or after the transport is torn down) gets
4141
# ``ValueError: I/O operation on closed file`` when touching stdio.
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)