@@ -424,7 +424,6 @@ def _disable_submission(schd: 'Scheduler') -> 'Set[TaskProxy]':
424424 submitted_tasks : 'Set[TaskProxy]' = set ()
425425
426426 def _submit_task_jobs (itasks ):
427- nonlocal submitted_tasks
428427 for itask in itasks :
429428 itask .state_reset (TASK_STATUS_SUBMITTED )
430429 submitted_tasks .update (itasks )
@@ -457,7 +456,6 @@ def _disable_polling(schd: 'Scheduler') -> 'Set[TaskProxy]':
457456 def run_job_cmd (
458457 _1 , _2 , itasks , _3 , _4 = None
459458 ):
460- nonlocal polled_tasks
461459 polled_tasks .update (itasks )
462460 return itasks
463461
@@ -567,7 +565,6 @@ def _reflog(schd: 'Scheduler', flow_nums: bool = False) -> Set[tuple]:
567565 triggers = set ()
568566
569567 def _submit_task_jobs (* args , ** kwargs ):
570- nonlocal submit_task_jobs , triggers , flow_nums
571568 itasks = submit_task_jobs (* args , ** kwargs )
572569 for itask in itasks :
573570 deps = tuple (sorted (itask .state .get_resolved_dependencies ()))
@@ -631,7 +628,6 @@ async def _complete(
631628 remove_if_complete = schd .pool .remove_if_complete
632629
633630 def _remove_if_complete (itask , output = None ):
634- nonlocal tokens_list
635631 ret = remove_if_complete (itask )
636632 if ret and itask .tokens .task in tokens_list :
637633 tokens_list .remove (itask .tokens .task )
@@ -642,7 +638,7 @@ def _remove_if_complete(itask, output=None):
642638 stop_requested = False
643639
644640 def _set_stop (mode = None ):
645- nonlocal stop_requested , stop_mode
641+ nonlocal stop_requested
646642 if mode == stop_mode :
647643 stop_requested = True
648644 return set_stop (mode )
@@ -760,7 +756,6 @@ def fake_submit(self, _workflow, itasks, *_):
760756
761757
762758 def get_submissions ():
763- nonlocal submit_live_calls
764759 return {
765760 itask .identity
766761 for ((_self , _workflow , itasks , * _ ), _kwargs ) in submit_live_calls
0 commit comments