Skip to content

Commit 2d3708d

Browse files
author
Ed Hagerty
committed
having to fix adafruit code to migrate to yield-from
1 parent 65ea984 commit 2d3708d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

adafruit_minimqtt/matcher.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ def rec(node: MQTTMatcher.Node, i: int = 0):
8888
else:
8989
part = lst[i]
9090
if part in node.children:
91-
for content in rec(node.children[part], i + 1):
92-
yield content
91+
yield from rec(node.children[part], i + 1)
9392
if "+" in node.children and (normal or i > 0):
94-
for content in rec(node.children["+"], i + 1):
95-
yield content
93+
yield from rec(node.children["+"], i + 1)
9694
if "#" in node.children and (normal or i > 0):
9795
content = node.children["#"].content
9896
if content is not None:

0 commit comments

Comments
 (0)