Skip to content

Commit

Permalink
Merge pull request #6188 from MetRonnie/flake8
Browse files Browse the repository at this point in the history
flake8-comprehensions
  • Loading branch information
wxtim authored Jul 1, 2024
2 parents dbfdce9 + cd18952 commit 821ecc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/network/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ async def get_nodes_edges(root, info: 'ResolveInfo', **args):


def resolve_state_totals(root, info, **args):
state_totals = {state: 0 for state in TASK_STATUSES_ORDERED}
state_totals = dict.fromkeys(TASK_STATUSES_ORDERED, 0)
# Update with converted protobuf map container
state_totals.update(
dict(getattr(root, to_snake_case(info.field_name), {})))
Expand Down
6 changes: 1 addition & 5 deletions cylc/flow/task_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,7 @@ def get_optional_outputs(
)
for output in used_compvars
},
# the outputs that are not used in the expression
**{
output: None
for output in all_compvars - used_compvars
},
**dict.fromkeys(all_compvars - used_compvars),
}


Expand Down
7 changes: 2 additions & 5 deletions cylc/flow/tui/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ def get_default_filters():
These filters show everything.
"""
return {
'tasks': {
# filtered task statuses
state: True
for state in TASK_STATUSES_ORDERED
},
# filtered task statuses
'tasks': dict.fromkeys(TASK_STATUSES_ORDERED, True),
'workflows': {
# filtered workflow statuses
**{
Expand Down

0 comments on commit 821ecc0

Please sign in to comment.