Skip to content

Commit 0224373

Browse files
committed
fix: type checking issue
1 parent 45df059 commit 0224373

File tree

1 file changed

+2
-3
lines changed
  • sentry_sdk/integrations/pydantic_ai

1 file changed

+2
-3
lines changed

sentry_sdk/integrations/pydantic_ai/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
# Store the current invoke_agent span in a contextvar for re-entrant safety
1515
# Using a list as a stack to support nested agent calls
16-
_invoke_agent_span_stack = ContextVar("pydantic_ai_invoke_agent_span_stack", default=[])
17-
# type: ContextVar[list[dict[str, Any]]]
16+
_invoke_agent_span_stack = ContextVar("pydantic_ai_invoke_agent_span_stack", default=[]) # type: ContextVar[list[dict[str, Any]]]
1817

1918

2019
def push_invoke_agent_span(span, agent, is_streaming=False):
@@ -101,7 +100,7 @@ def _set_agent_data(span, agent):
101100

102101

103102
def _get_model_name(model_obj):
104-
# type: (Any) -> str | None
103+
# type: (Any) -> Optional[str]
105104
"""Extract model name from a model object.
106105
107106
Args:

0 commit comments

Comments
 (0)