Skip to content

Commit 70c9233

Browse files
committed
Remove no-cover pragmas for paths now exercised by story examples
1 parent 488e343 commit 70c9233

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
@@ -561,7 +561,7 @@ def streamable_http_app(
561561
)
562562
)
563563

564-
if custom_starlette_routes: # pragma: no cover
564+
if custom_starlette_routes:
565565
routes.extend(custom_starlette_routes)
566566

567567
return Starlette(

src/mcp/server/mcpserver/server.py

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

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

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

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

833-
return decorator # pragma: no cover
833+
return decorator
834834

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

0 commit comments

Comments
 (0)