Skip to content

Commit 78aa005

Browse files
committed
Remove no-cover pragmas for paths now exercised by story examples
1 parent 92566d4 commit 78aa005

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/mcp/server/elicitation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def elicit_with_validation(
113113
return AcceptedElicitation(data=validated_data)
114114
elif result.action == "decline":
115115
return DeclinedElicitation()
116-
elif result.action == "cancel": # pragma: no cover
116+
elif result.action == "cancel":
117117
return CancelledElicitation()
118118
else: # pragma: no cover
119119
# This should never happen, but handle it just in case

src/mcp/server/lowlevel/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def streamable_http_app(
555555
)
556556
)
557557

558-
if custom_starlette_routes: # pragma: no cover
558+
if custom_starlette_routes:
559559
routes.extend(custom_starlette_routes)
560560

561561
return Starlette(

src/mcp/server/mcpserver/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def __init__(
199199
self._token_verifier = token_verifier
200200

201201
# Create token verifier from provider if needed (backwards compatibility)
202-
if auth_server_provider and not token_verifier: # pragma: no cover
202+
if auth_server_provider and not token_verifier:
203203
self._token_verifier = ProviderTokenVerifier(auth_server_provider)
204204
self._custom_starlette_routes: list[Route] = []
205205

@@ -821,15 +821,15 @@ async def health_check(request: Request) -> Response:
821821
```
822822
"""
823823

824-
def decorator( # pragma: no cover
824+
def decorator(
825825
func: Callable[[Request], Awaitable[Response]],
826826
) -> Callable[[Request], Awaitable[Response]]:
827827
self._custom_starlette_routes.append(
828828
Route(path, endpoint=func, methods=methods, name=name, include_in_schema=include_in_schema)
829829
)
830830
return func
831831

832-
return decorator # pragma: no cover
832+
return decorator
833833

834834
async def run_stdio_async(self) -> None:
835835
"""Run the server using stdio transport."""

0 commit comments

Comments
 (0)