We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b13cfbe commit fc55e04Copy full SHA for fc55e04
1 file changed
sentry_sdk/integrations/pydantic_ai/patches/agent_run.py
@@ -15,7 +15,7 @@
15
raise DidNotEnable("pydantic-ai not installed")
16
17
if TYPE_CHECKING:
18
- from typing import Any, Callable, Optional
+ from typing import Any, Callable, Optional, Union
19
20
21
class _StreamingContextManagerWrapper:
@@ -37,7 +37,7 @@ def __init__(
37
self.model_settings = model_settings
38
self.is_streaming = is_streaming
39
self._isolation_scope: "Any" = None
40
- self._span: "Optional[sentry_sdk.tracing.Span, sentry_sdk.traces.StreamedSpan]" = None
+ self._span: "Optional[Union[sentry_sdk.tracing.Span, sentry_sdk.traces.StreamedSpan]]" = None
41
self._result: "Any" = None
42
43
async def __aenter__(self) -> "Any":
0 commit comments