Skip to content

Commit fdc987b

Browse files
committed
Type ignore instead of recheck
1 parent 496bdfa commit fdc987b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

temporalio/contrib/openai_agents/_trace_interceptor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def start_activity(
411411
set_header_from_context(input, temporalio.workflow.payload_converter())
412412
handle = self.next.start_activity(input)
413413
if span:
414-
handle.add_done_callback(lambda _: span.finish() if span else None)
414+
handle.add_done_callback(lambda _: span.finish()) # type: ignore
415415
return handle
416416

417417
async def start_child_workflow(
@@ -427,7 +427,7 @@ async def start_child_workflow(
427427
set_header_from_context(input, temporalio.workflow.payload_converter())
428428
handle = await self.next.start_child_workflow(input)
429429
if span:
430-
handle.add_done_callback(lambda _: span.finish() if span else None)
430+
handle.add_done_callback(lambda _: span.finish()) # type: ignore
431431
return handle
432432

433433
def start_local_activity(
@@ -443,5 +443,5 @@ def start_local_activity(
443443
set_header_from_context(input, temporalio.workflow.payload_converter())
444444
handle = self.next.start_local_activity(input)
445445
if span:
446-
handle.add_done_callback(lambda _: span.finish() if span else None)
446+
handle.add_done_callback(lambda _: span.finish()) # type: ignore
447447
return handle

0 commit comments

Comments
 (0)