Skip to content

Commit f894720

Browse files
committed
[Temporal - Documentation] Fixing PR errors
1 parent 38209c6 commit f894720

File tree

1 file changed

+3
-4
lines changed
  • examples/pydantic_ai_examples/temporal_streaming

1 file changed

+3
-4
lines changed

examples/pydantic_ai_examples/temporal_streaming/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import asyncio
88
import os
99
import uuid
10-
from typing import Any, Union
10+
from typing import Any
1111

1212
from temporalio.client import Client, WorkflowHandle
1313
from temporalio.worker import Worker
@@ -28,9 +28,8 @@ async def poll_events(workflow_handle: WorkflowHandle[Any, str]) -> None:
2828
workflow_handle: Handle to the running workflow.
2929
"""
3030
while True:
31-
event: Union[EventStream, None] = await workflow_handle.query('event_stream',
32-
result_type=Union[
33-
EventStream, None]) # type: ignore[misc]
31+
event: EventStream | None = await workflow_handle.query('event_stream',
32+
result_type=EventStream | None) # type: ignore[misc]
3433
if event is None:
3534
await asyncio.sleep(0.1)
3635
continue

0 commit comments

Comments
 (0)