Skip to content

Commit 720db06

Browse files
mypy
1 parent b8d396b commit 720db06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sentry_sdk/integrations/openai_agents/patches/agent_run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
if TYPE_CHECKING:
99
from typing import Any, Optional
1010

11+
from sentry_sdk.tracing import Span
12+
1113
try:
1214
import agents
1315
except ImportError:
@@ -27,7 +29,7 @@ def _patch_agent_run():
2729
original_execute_final_output = agents._run_impl.RunImpl.execute_final_output
2830

2931
def _start_invoke_agent_span(context_wrapper, agent, kwargs):
30-
# type: (agents.RunContextWrapper, agents.Agent, dict[str, Any]) -> None
32+
# type: (agents.RunContextWrapper, agents.Agent, dict[str, Any]) -> Span
3133
"""Start an agent invocation span"""
3234
# Store the agent on the context wrapper so we can access it later
3335
context_wrapper._sentry_current_agent = agent

0 commit comments

Comments
 (0)