Update dependencies and fix type issues (#1268)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
David Soria Parra 2025-08-14 10:40:47 +01:00 • committed by GitHub
commit 0926613714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 303 additions and 286 deletions

View file

@ -21,7 +21,7 @@ async def run_tool_test(
tools: list[Tool],
call_tool_handler: Callable[[str, dict[str, Any]], Awaitable[list[TextContent]]],
test_callback: Callable[[ClientSession], Awaitable[CallToolResult]],
) -> CallToolResult:
) -> CallToolResult | None:
"""Helper to run a tool test with minimal boilerplate.
Args:
@ -33,6 +33,7 @@ async def run_tool_test(
The result of the tool call
"""
server = Server("test")
result = None
@server.list_tools()
async def list_tools():

View file

@ -21,7 +21,7 @@ async def run_tool_test(
tools: list[Tool],
call_tool_handler: Callable[[str, dict[str, Any]], Awaitable[Any]],
test_callback: Callable[[ClientSession], Awaitable[CallToolResult]],
) -> CallToolResult:
) -> CallToolResult | None:
"""Helper to run a tool test with minimal boilerplate.
Args:
@ -34,6 +34,8 @@ async def run_tool_test(
"""
server = Server("test")
result = None
@server.list_tools()
async def list_tools():
return tools

View file

@ -39,6 +39,7 @@ async def test_lowlevel_server_tool_annotations():
)
]
tools_result = None
server_to_client_send, server_to_client_receive = anyio.create_memory_object_stream[SessionMessage](10)
client_to_server_send, client_to_server_receive = anyio.create_memory_object_stream[SessionMessage](10)