55 Any ,
66 AsyncGenerator ,
77 Literal ,
8- Optional ,
98 Protocol ,
109)
1110
@@ -38,7 +37,7 @@ class UiPathExecuteOptions(BaseModel):
3837 default = False ,
3938 description = "Indicates whether to resume a suspended execution." ,
4039 )
41- breakpoints : Optional [ list [str ] | Literal ["*" ]] = Field (
40+ breakpoints : list [str ] | Literal ["*" ] | None = Field (
4241 default = None ,
4342 description = "List of nodes or '*' to break on all steps." ,
4443 )
@@ -57,8 +56,8 @@ class UiPathExecutableProtocol(Protocol):
5756
5857 async def execute (
5958 self ,
60- input : Optional [ dict [str , Any ]] = None ,
61- options : Optional [ UiPathExecuteOptions ] = None ,
59+ input : dict [str , Any ] | None = None ,
60+ options : UiPathExecuteOptions | None = None ,
6261 ) -> UiPathRuntimeResult :
6362 """Execute the runtime with the given input and options."""
6463 ...
@@ -69,8 +68,8 @@ class UiPathStreamableProtocol(Protocol):
6968
7069 async def stream (
7170 self ,
72- input : Optional [ dict [str , Any ]] = None ,
73- options : Optional [ UiPathStreamOptions ] = None ,
71+ input : dict [str , Any ] | None = None ,
72+ options : UiPathStreamOptions | None = None ,
7473 ) -> AsyncGenerator [UiPathRuntimeEvent , None ]:
7574 """Stream execution events in real-time.
7675
@@ -147,9 +146,9 @@ def __init__(
147146 delegate : UiPathRuntimeProtocol ,
148147 trace_manager : UiPathTraceManager ,
149148 root_span : str = "root" ,
150- span_attributes : Optional [ dict [str , str ]] = None ,
151- log_handler : Optional [ UiPathRuntimeExecutionLogHandler ] = None ,
152- execution_id : Optional [ str ] = None ,
149+ span_attributes : dict [str , str ] | None = None ,
150+ log_handler : UiPathRuntimeExecutionLogHandler | None = None ,
151+ execution_id : str | None = None ,
153152 ):
154153 """Initialize the executor."""
155154 self .delegate = delegate
@@ -163,8 +162,8 @@ def __init__(
163162
164163 async def execute (
165164 self ,
166- input : Optional [ dict [str , Any ]] = None ,
167- options : Optional [ UiPathExecuteOptions ] = None ,
165+ input : dict [str , Any ] | None = None ,
166+ options : UiPathExecuteOptions | None = None ,
168167 ) -> UiPathRuntimeResult :
169168 """Execute runtime with context."""
170169 if self .log_handler :
@@ -190,8 +189,8 @@ async def execute(
190189
191190 async def stream (
192191 self ,
193- input : Optional [ dict [str , Any ]] = None ,
194- options : Optional [ UiPathStreamOptions ] = None ,
192+ input : dict [str , Any ] | None = None ,
193+ options : UiPathStreamOptions | None = None ,
195194 ) -> AsyncGenerator [UiPathRuntimeEvent , None ]:
196195 """Stream runtime execution with context.
197196
0 commit comments