Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/claude_agent_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
from pathlib import Path
from typing import TYPE_CHECKING, Any, Literal, TypedDict

from typing_extensions import NotRequired
Copy link
Contributor Author

@harupy harupy Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the mcp package (and many packages also) requries typing_extensions, this import actually doesn't fail even in Python >= 3.11

try:
# Python >= 3.11
from typing import NotRequired
except ImportError:
# Python < 3.11
from typing_extensions import NotRequired

if TYPE_CHECKING:
from mcp.server import Server as McpServer
Expand Down
Loading