@@ -98,7 +98,7 @@ def __init__(self, base_ctx: dt_task.OrchestrationContext):
9898 self ._workflow_name : Optional [str ] = None
9999 self ._current_step : Optional [str ] = None
100100 # Set by sandbox when active
101- self ._sandbox_originals : Optional [dict [str , Any ]] = None
101+ self ._sandbox_originals : Optional [Dict [str , Any ]] = None
102102 self ._sandbox_mode : Optional [str ] = None
103103
104104 # Performance optimization: Check if detection should be globally disabled
@@ -236,7 +236,7 @@ def activity(
236236 input : Any = None ,
237237 retry_policy : Any = None ,
238238 app_id : Optional [str ] = None ,
239- metadata : dict [ str , str ] | None = None ,
239+ metadata : Optional [ Dict [ str , str ]] = None ,
240240 ) -> ActivityAwaitable [Any ]:
241241 """
242242 Create an awaitable for calling an activity function.
@@ -267,7 +267,7 @@ def call_activity(
267267 input : Any = None ,
268268 retry_policy : Any = None ,
269269 app_id : Optional [str ] = None ,
270- metadata : dict [ str , str ] | None = None ,
270+ metadata : Optional [ Dict [ str , str ]] = None ,
271271 ) -> ActivityAwaitable [Any ]:
272272 """Alias for activity() method for API compatibility."""
273273 return self .activity (
@@ -287,7 +287,7 @@ def sub_orchestrator(
287287 instance_id : Optional [str ] = None ,
288288 retry_policy : Any = None ,
289289 app_id : Optional [str ] = None ,
290- metadata : dict [ str , str ] | None = None ,
290+ metadata : Optional [ Dict [ str , str ]] = None ,
291291 ) -> SubOrchestratorAwaitable [Any ]:
292292 """
293293 Create an awaitable for calling a sub-orchestrator.
@@ -324,7 +324,7 @@ def call_sub_orchestrator(
324324 instance_id : Optional [str ] = None ,
325325 retry_policy : Any = None ,
326326 app_id : Optional [str ] = None ,
327- metadata : dict [ str , str ] | None = None ,
327+ metadata : Optional [ Dict [ str , str ]] = None ,
328328 ) -> SubOrchestratorAwaitable [Any ]:
329329 """Call a sub-orchestrator workflow (durabletask naming convention)."""
330330 return self .sub_orchestrator (
@@ -472,7 +472,7 @@ def continue_as_new(self, input_data: Any = None, *, save_events: bool = False)
472472 self ._base_ctx .continue_as_new (input_data , save_events = save_events )
473473
474474 # Metadata and header methods
475- def set_metadata (self , metadata : dict [str , str ]) -> None :
475+ def set_metadata (self , metadata : Dict [str , str ]) -> None :
476476 """
477477 Set metadata for the workflow instance.
478478
@@ -483,7 +483,7 @@ def set_metadata(self, metadata: dict[str, str]) -> None:
483483 self ._base_ctx .set_metadata (metadata )
484484 self ._log_operation ('set_metadata' , {'metadata' : metadata })
485485
486- def get_metadata (self ) -> Optional [dict [str , str ]]:
486+ def get_metadata (self ) -> Optional [Dict [str , str ]]:
487487 """
488488 Get metadata for the workflow instance.
489489
@@ -493,10 +493,10 @@ def get_metadata(self) -> Optional[dict[str, str]]:
493493 if hasattr (self ._base_ctx , 'get_metadata' ):
494494 val : Any = self ._base_ctx .get_metadata ()
495495 if isinstance (val , dict ):
496- return cast (dict [str , str ], val )
496+ return cast (Dict [str , str ], val )
497497 return None
498498
499- def set_headers (self , headers : dict [str , str ]) -> None :
499+ def set_headers (self , headers : Dict [str , str ]) -> None :
500500 """
501501 Set headers for the workflow instance (alias for set_metadata).
502502
@@ -505,7 +505,7 @@ def set_headers(self, headers: dict[str, str]) -> None:
505505 """
506506 self .set_metadata (headers )
507507
508- def get_headers (self ) -> Optional [dict [str , str ]]:
508+ def get_headers (self ) -> Optional [Dict [str , str ]]:
509509 """
510510 Get headers for the workflow instance (alias for get_metadata).
511511
0 commit comments