Skip to content

Commit 8ac87a9

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 e0306f9 commit 8ac87a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mcp/server/streamable_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,8 @@ async def message_router():
10181018
might reconnect and replay."""
10191019
)
10201020
except anyio.ClosedResourceError:
1021-
if self._terminated: # pragma: no cover
1022-
logger.debug("Read stream closed by client")
1021+
if self._terminated:
1022+
logger.debug("Read stream closed by client") # pragma: no cover
10231023
else:
10241024
logger.exception("Unexpected closure of read stream in message router")
10251025
except Exception: # pragma: lax no cover

0 commit comments

Comments
 (0)