Skip to content

Commit 6010970

Browse files
committed
fix: remove stale no-cover pragma and unused variable flagged by CI
1 parent bb7192b commit 6010970

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/mcp/client/streamable_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ async def _handle_reconnection(
553553
# Stream ended again without response - reconnect again (reset attempt counter)
554554
logger.info("SSE stream disconnected, reconnecting...")
555555
await self._handle_reconnection(ctx, reconnect_last_event_id, reconnect_retry_ms, 0, last_exc=last_exc)
556-
except Exception as e: # pragma: no cover
556+
except Exception as e:
557557
logger.debug(f"Reconnection failed: {e}")
558558
# Try to reconnect again if we still have an event ID
559559
await self._handle_reconnection(ctx, last_event_id, retry_interval_ms, attempt + 1, last_exc=e)

tests/client/test_streamable_http.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,9 +835,8 @@ async def test_forwarding_a_stream_fault_after_the_reader_closed_is_contained()
835835
transport = StreamableHTTPTransport("http://test/mcp")
836836
send, receive = create_context_streams[SessionMessage | Exception](1)
837837
receive.close()
838-
async with httpx2.AsyncClient() as http:
839-
with anyio.fail_after(5):
840-
await transport._forward_stream_fault( # pyright: ignore[reportPrivateUsage]
841-
send, httpx2.ReadError("connection reset")
842-
)
838+
with anyio.fail_after(5):
839+
await transport._forward_stream_fault( # pyright: ignore[reportPrivateUsage]
840+
send, httpx2.ReadError("connection reset")
841+
)
843842
send.close()

0 commit comments

Comments
 (0)