@@ -28,8 +28,8 @@ class _Registry:
2828 activities : Dict [str , task .Activity ]
2929
3030 def __init__ (self ):
31- self .orchestrators = dict [ str , task . Orchestrator ]()
32- self .activities = dict [ str , task . Activity ]()
31+ self .orchestrators = {}
32+ self .activities = {}
3333
3434 def add_orchestrator (self , fn : task .Orchestrator ) -> str :
3535 if fn is None :
@@ -228,8 +228,8 @@ def __init__(self, instance_id: str):
228228 self ._is_replaying = True
229229 self ._is_complete = False
230230 self ._result = None
231- self ._pending_actions = dict [int , pb .OrchestratorAction ]()
232- self ._pending_tasks = dict [int , task .CompletableTask ]()
231+ self ._pending_actions : Dict [int , pb .OrchestratorAction ] = {}
232+ self ._pending_tasks : Dict [int , task .CompletableTask ] = {}
233233 self ._sequence_number = 0
234234 self ._current_utc_datetime = datetime (1000 , 1 , 1 )
235235 self ._instance_id = instance_id
@@ -736,7 +736,7 @@ def _get_new_event_summary(new_events: Sequence[pb.HistoryEvent]) -> str:
736736 elif len (new_events ) == 1 :
737737 return f"[{ new_events [0 ].WhichOneof ('eventType' )} ]"
738738 else :
739- counts = dict [str , int ]()
739+ counts : Dict [str , int ] = {}
740740 for event in new_events :
741741 event_type = event .WhichOneof ('eventType' )
742742 counts [event_type ] = counts .get (event_type , 0 ) + 1
@@ -750,7 +750,7 @@ def _get_action_summary(new_actions: Sequence[pb.OrchestratorAction]) -> str:
750750 elif len (new_actions ) == 1 :
751751 return f"[{ new_actions [0 ].WhichOneof ('orchestratorActionType' )} ]"
752752 else :
753- counts = dict [str , int ]()
753+ counts : Dict [str , int ] = {}
754754 for action in new_actions :
755755 action_type = action .WhichOneof ('orchestratorActionType' )
756756 counts [action_type ] = counts .get (action_type , 0 ) + 1
0 commit comments