Skip to content

Commit

Permalink
Update cylc/flow/task_outputs.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ronnie Dutta <[email protected]>
  • Loading branch information
wxtim and MetRonnie authored Mar 11, 2024
1 parent 45b24cc commit a286483
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cylc/flow/task_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,7 @@ def output_sort_key(item):
>>> sorted(['finished', 'started', 'custom'], key=this)
['started', 'custom', 'finished']
"""
task_outputs = {o: i for i, o in enumerate(TASK_OUTPUTS)}
if item in TASK_OUTPUTS:
return task_outputs[item]
else:
# Sorts custom outputs after started.
return TASK_OUTPUTS.index(TASK_OUTPUT_STARTED) + .5
return TASK_OUTPUTS.index(item)
# Sort custom outputs after started.
return TASK_OUTPUTS.index(TASK_OUTPUT_STARTED) + .5

0 comments on commit a286483

Please sign in to comment.