Skip to content

Commit c5bce60

Browse files
committed
Applying formatting
1 parent de6dd61 commit c5bce60

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/mcp/shared/session.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,7 @@ async def _receive_loop(self) -> None:
344344
# Send error to any pending request response streams immediately
345345
for id, stream in list(self._response_streams.items()):
346346
try:
347-
await stream.send(
348-
JSONRPCError(jsonrpc="2.0", id=id, error=error)
349-
)
347+
await stream.send(JSONRPCError(jsonrpc="2.0", id=id, error=error))
350348
await stream.aclose()
351349
except Exception:
352350
pass

tests/shared/test_streamable_http.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,8 @@ async def test_streamable_http_mid_call_disconnect(basic_server_port: int):
625625
except OSError:
626626
time.sleep(0.1)
627627
else: # pragma: no cover
628-
proc.kill(); proc.join(timeout=2)
628+
proc.kill()
629+
proc.join(timeout=2)
629630
pytest.fail("Server failed to start in time")
630631

631632
server_url = f"http://127.0.0.1:{basic_server_port}/mcp"
@@ -649,7 +650,8 @@ async def invoke():
649650
tg.start_soon(invoke)
650651
# Give the request a moment to reach the server & tool to start (it sends a log notification)
651652
await anyio.sleep(0.6)
652-
proc.kill(); proc.join(timeout=2)
653+
proc.kill()
654+
proc.join(timeout=2)
653655
# Wait for propagated disconnect
654656
with anyio.fail_after(10):
655657
while "err" not in result:
@@ -660,7 +662,8 @@ async def invoke():
660662
assert err.error.code == types.CONNECTION_CLOSED
661663
finally:
662664
if proc.is_alive(): # Safety cleanup
663-
proc.kill(); proc.join(timeout=2)
665+
proc.kill()
666+
proc.join(timeout=2)
664667

665668

666669
def test_session_termination(basic_server: None, basic_server_url: str):

0 commit comments

Comments
 (0)