Skip to content

Commit ffbcf2a

Browse files
committed
replace uniq with iter_uniq wherever possible.
1 parent d3f0c5b commit ffbcf2a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

cylc/flow/network/resolvers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def workflow_ids_filter(workflow_tokens, items) -> bool:
134134
or workflow_tokens['workflow_sel'] == item['workflow_sel']
135135
)
136136
)
137-
for item in uniq(items)
137+
for item in iter_uniq(items)
138138
)
139139

140140

cylc/flow/util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ def uniq(iterable):
5959
[1, 2, 3, 5, 8]
6060
6161
"""
62-
ret = []
63-
for item in iterable:
64-
if item not in ret:
65-
ret.append(item)
66-
return ret
62+
return list(iter_uniq(iterable))
6763

6864

6965
def iter_uniq(iterable):

0 commit comments

Comments
 (0)