Skip to content

Commit 54c2e71

Browse files
g97iulio1609Copilot
andcommitted
style: apply ruff format
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f9c5d43 commit 54c2e71

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

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)