@@ -929,7 +929,7 @@ async def test_resource_decorator_with_metadata(self):
929929 mcp = MCPServer ()
930930
931931 @mcp .resource ("resource://config" , meta = {"ui" : {"component" : "file-viewer" }, "priority" : "high" })
932- def get_config () -> str : ...
932+ def get_config () -> str : ... # pragma: no branch
933933
934934 resources = await mcp .list_resources ()
935935 assert resources == snapshot (
@@ -950,7 +950,7 @@ async def test_resource_template_decorator_with_metadata(self):
950950 mcp = MCPServer ()
951951
952952 @mcp .resource ("resource://{city}/weather" , meta = {"api_version" : "v2" , "deprecated" : False })
953- def get_weather (city : str ) -> str : ...
953+ def get_weather (city : str ) -> str : ... # pragma: no branch
954954
955955 templates = await mcp .list_resource_templates ()
956956 assert templates == snapshot (
@@ -1277,15 +1277,14 @@ def test_prompt_decorator_error(self):
12771277 with pytest .raises (TypeError , match = "decorator was used incorrectly" ):
12781278
12791279 @mcp .prompt # type: ignore
1280- def fn () -> str :
1281- return "Hello, world!"
1280+ def fn () -> str : ... # pragma: no branch
12821281
12831282 async def test_list_prompts (self ):
12841283 """Test listing prompts through MCP protocol."""
12851284 mcp = MCPServer ()
12861285
12871286 @mcp .prompt ()
1288- def fn (name : str , optional : str = "default" ) -> str : ...
1287+ def fn (name : str , optional : str = "default" ) -> str : ... # pragma: no branch
12891288
12901289 async with Client (mcp ) as client :
12911290 result = await client .list_prompts ()
@@ -1395,7 +1394,7 @@ async def test_get_prompt_missing_args(self):
13951394 mcp = MCPServer ()
13961395
13971396 @mcp .prompt ()
1398- def prompt_fn (name : str ) -> str : ...
1397+ def prompt_fn (name : str ) -> str : ... # pragma: no branch
13991398
14001399 async with Client (mcp ) as client :
14011400 with pytest .raises (MCPError , match = "Missing required arguments" ):
0 commit comments