Skip to content

Commit

Permalink
Merge 3b97fa7 into 8d860c3
Browse files Browse the repository at this point in the history
  • Loading branch information
jdufresne committed Oct 20, 2019
2 parents 8d860c3 + 3b97fa7 commit 0c667f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# more-itertools documentation build configuration file, created by
# sphinx-quickstart on Mon Jun 25 20:42:39 2012.
Expand Down
3 changes: 1 addition & 2 deletions more_itertools/more.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,7 @@ def walk(node, level):
return
else:
for child in tree:
for x in walk(child, level + 1):
yield x
yield from walk(child, level + 1)

yield from walk(iterable, 0)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_more.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def test_ilen(self):
)

# Empty
self.assertEqual(mi.ilen((x for x in range(0))), 0)
self.assertEqual(mi.ilen(x for x in range(0)), 0)

# Iterable with __len__
self.assertEqual(mi.ilen(list(range(6))), 6)
Expand Down Expand Up @@ -2692,7 +2692,7 @@ def test_repeated(self):
def test_each_correct(self):
a = set(range(6))
for p in mi.set_partitions(a):
total = set(e for g in p for e in g)
total = {e for g in p for e in g}
self.assertEqual(a, total)

def test_duplicates(self):
Expand Down

0 comments on commit 0c667f6

Please sign in to comment.