mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-20 07:14:24 +01:00
Close unclosed resources in the whole project (#267)
* Close resources * Close all resources * Update pyproject.toml * Close all resources * Close all resources * try now... * try to ignore this * try again * try adding one more.. * try now * try now * revert ci changes
This commit is contained in:
committed by
GitHub
parent
1691b905e2
commit
94d326dbf1
@@ -43,7 +43,9 @@ async def _default_list_roots_callback(
|
||||
)
|
||||
|
||||
|
||||
ClientResponse = TypeAdapter(types.ClientResult | types.ErrorData)
|
||||
ClientResponse: TypeAdapter[types.ClientResult | types.ErrorData] = TypeAdapter(
|
||||
types.ClientResult | types.ErrorData
|
||||
)
|
||||
|
||||
|
||||
class ClientSession(
|
||||
@@ -219,7 +221,7 @@ class ClientSession(
|
||||
)
|
||||
|
||||
async def call_tool(
|
||||
self, name: str, arguments: dict | None = None
|
||||
self, name: str, arguments: dict[str, Any] | None = None
|
||||
) -> types.CallToolResult:
|
||||
"""Send a tools/call request."""
|
||||
return await self.send_request(
|
||||
@@ -258,7 +260,9 @@ class ClientSession(
|
||||
)
|
||||
|
||||
async def complete(
|
||||
self, ref: types.ResourceReference | types.PromptReference, argument: dict
|
||||
self,
|
||||
ref: types.ResourceReference | types.PromptReference,
|
||||
argument: dict[str, str],
|
||||
) -> types.CompleteResult:
|
||||
"""Send a completion/complete request."""
|
||||
return await self.send_request(
|
||||
|
||||
Reference in New Issue
Block a user