Skip to content

Commit

Permalink
lint: address PERF101
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Jul 8, 2024
1 parent fcabe74 commit 2f43b4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/network/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def _report(
"""
try:
ret: List[Tuple[Optional[str], Optional[str], bool]] = []
for _mutation_name, mutation_response in response.items():
for mutation_response in response.values():
# extract the result of each mutation result in the response
success, msg = mutation_response['result'][0]['response']
out = None
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ def process_queued_task_messages(self) -> None:
# Remaining unprocessed messages have no corresponding task proxy.
# For example, if I manually set a running task to succeeded, the
# proxy can be removed, but the orphaned job still sends messages.
for _id, tms in messages.items():
for tms in messages.values():
warn = "Undeliverable task messages received and ignored:"
for _, msg in tms:
warn += f'\n {msg.job_id}: {msg.severity} - "{msg.message}"'
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ def get_tasks(self) -> List[TaskProxy]:
if self.active_tasks_changed:
self.active_tasks_changed = False
self._active_tasks_list = []
for _, itask_id_map in self.active_tasks.items():
for __, itask in itask_id_map.items():
for itask_id_map in self.active_tasks.values():
for itask in itask_id_map.values():
self._active_tasks_list.append(itask)
return self._active_tasks_list

Expand Down

0 comments on commit 2f43b4e

Please sign in to comment.