File tree Expand file tree Collapse file tree
sentry_sdk/integrations/openai_agents/patches Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,10 +116,8 @@ async def _run_single_turn(
116116
117117 if (
118118 span is None
119- or isinstance (span , StreamedSpan )
120- and span .end_timestamp is not None
121- or not isinstance (span , StreamedSpan )
122- and span .timestamp is not None
119+ or (isinstance (span , StreamedSpan ) and span .end_timestamp is not None )
120+ or (not isinstance (span , StreamedSpan ) and span .timestamp is not None )
123121 ):
124122 return await original_run_single_turn (* args , ** kwargs )
125123
@@ -202,10 +200,8 @@ async def _run_single_turn_streamed(
202200
203201 if (
204202 span is None
205- or isinstance (span , StreamedSpan )
206- and span .end_timestamp is not None
207- or not isinstance (span , StreamedSpan )
208- and span .timestamp is not None
203+ or (isinstance (span , StreamedSpan ) and span .end_timestamp is not None )
204+ or (not isinstance (span , StreamedSpan ) and span .timestamp is not None )
209205 ):
210206 return await original_run_single_turn_streamed (* args , ** kwargs )
211207
You can’t perform that action at this time.
0 commit comments