Skip to content

Commit 2513380

Browse files
committed
Add pragma: no cover to Protocol stubs and unused clone() methods
1 parent 6fef500 commit 2513380

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/mcp/client/_transport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
@runtime_checkable
18-
class ReadStream(Protocol[T_co]):
18+
class ReadStream(Protocol[T_co]): # pragma: no cover
1919
"""Protocol for reading items from a stream.
2020
2121
Both ``MemoryObjectReceiveStream`` and ``ContextReceiveStream`` satisfy
@@ -37,7 +37,7 @@ async def __aexit__(
3737

3838

3939
@runtime_checkable
40-
class WriteStream(Protocol[T_contra]):
40+
class WriteStream(Protocol[T_contra]): # pragma: no cover
4141
"""Protocol for writing items to a stream.
4242
4343
Both ``MemoryObjectSendStream`` and ``ContextSendStream`` satisfy

src/mcp/shared/_context_streams.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def close(self) -> None:
4343
async def aclose(self) -> None:
4444
await self._inner.aclose()
4545

46-
def clone(self) -> ContextSendStream[T]:
46+
def clone(self) -> ContextSendStream[T]: # pragma: no cover
4747
return ContextSendStream(self._inner.clone())
4848

4949
async def __aenter__(self) -> ContextSendStream[T]:
@@ -79,7 +79,7 @@ def close(self) -> None:
7979
async def aclose(self) -> None:
8080
await self._inner.aclose()
8181

82-
def clone(self) -> ContextReceiveStream[T]:
82+
def clone(self) -> ContextReceiveStream[T]: # pragma: no cover
8383
return ContextReceiveStream(self._inner.clone())
8484

8585
def __aiter__(self) -> ContextReceiveStream[T]:

0 commit comments

Comments
 (0)