mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
fix: add McpServer runtime placeholder for Pydantic 2.12+ compatibility (#385)
## Summary - Add runtime placeholder for `McpServer` type to fix Pydantic 2.12+ compatibility - `McpServer` was only imported under `TYPE_CHECKING`, causing `PydanticUserError` at runtime Fixes #384 Co-authored-by: lyrica <lyrica@example.com>
This commit is contained in:
parent
2d67166cae
commit
6791efec93
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,9 @@ from typing_extensions import NotRequired
|
|||
|
||||
if TYPE_CHECKING:
|
||||
from mcp.server import Server as McpServer
|
||||
else:
|
||||
# Runtime placeholder for forward reference resolution in Pydantic 2.12+
|
||||
McpServer = Any
|
||||
|
||||
# Permission modes
|
||||
PermissionMode = Literal["default", "acceptEdits", "plan", "bypassPermissions"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue