Update dependencies and fix type issues (#1268)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
a82c69bfd9
commit
0926613714
3 changed files with 303 additions and 286 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue