Skip to content

Commit 1f857f0

Browse files
authored
Remove unnecessary coerce to list (#1321)
sorted() takes any iterable and always returns a new list. No need to eagerly coerce to a list.
1 parent 0851c0d commit 1f857f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,7 @@ def test_binary_lists(self, r):
26562656
r.rpush(key, *value)
26572657

26582658
# check that KEYS returns all the keys as they are
2659-
assert sorted(r.keys('*')) == sorted(list(iterkeys(mapping)))
2659+
assert sorted(r.keys('*')) == sorted(iterkeys(mapping))
26602660

26612661
# check that it is possible to get list content by key name
26622662
for key, value in iteritems(mapping):

0 commit comments

Comments
 (0)