Skip to content

Commit f2202c7

Browse files
committed
Avoid duplicate type change to list
1 parent 4fad266 commit f2202c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/shopify_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ def run_task(cls, task=None, *args):
5252
# Allow unambigious abbreviations of tasks
5353
if task not in cls._tasks:
5454
matches = filter(lambda item: item.startswith(task), cls._tasks)
55-
if len(list(matches)) == 1:
56-
task = list(matches)[0]
55+
list_of_matches = list(matches)
56+
if len(list_of_matches) == 1:
57+
task = list_of_matches[0]
5758
else:
5859
sys.stderr.write('Could not find task "%s".\n' % (task))
5960

0 commit comments

Comments
 (0)