Skip to content

Commit f6909a1

Browse files
wiggzzclaude
andcommitted
Move pragma: no cover to logger.debug (the unreachable line)
The if-branch check itself is reachable; it's the body that isn't. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1095767 commit f6909a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcp/server/streamable_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,8 @@ async def message_router():
10251025
might reconnect and replay."""
10261026
)
10271027
except anyio.ClosedResourceError:
1028-
if self._terminated: # pragma: no cover
1029-
logger.debug("Read stream closed by client")
1028+
if self._terminated:
1029+
logger.debug("Read stream closed by client") # pragma: no cover
10301030
else:
10311031
logger.exception("Unexpected closure of read stream in message router")
10321032
except Exception: # pragma: lax no cover

0 commit comments

Comments
 (0)