mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
fix: correct mypy type ignore error codes for MCP decorators (#379)
Update type: ignore comments to use `untyped-decorator` instead of `misc` to match the actual mypy error codes reported in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f21f63e181
commit
49482e1dfd
1 changed files with 2 additions and 2 deletions
|
|
@ -218,7 +218,7 @@ def create_sdk_mcp_server(
|
|||
tool_map = {tool_def.name: tool_def for tool_def in tools}
|
||||
|
||||
# Register list_tools handler to expose available tools
|
||||
@server.list_tools() # type: ignore[no-untyped-call,misc]
|
||||
@server.list_tools() # type: ignore[no-untyped-call,untyped-decorator]
|
||||
async def list_tools() -> list[Tool]:
|
||||
"""Return the list of available tools."""
|
||||
tool_list = []
|
||||
|
|
@ -264,7 +264,7 @@ def create_sdk_mcp_server(
|
|||
return tool_list
|
||||
|
||||
# Register call_tool handler to execute tools
|
||||
@server.call_tool() # type: ignore[misc]
|
||||
@server.call_tool() # type: ignore[untyped-decorator]
|
||||
async def call_tool(name: str, arguments: dict[str, Any]) -> Any:
|
||||
"""Execute a tool by name with given arguments."""
|
||||
if name not in tool_map:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue