We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fea6dd3 commit 0acc9b7Copy full SHA for 0acc9b7
quixstreams/core/stream/stream.py
@@ -234,14 +234,19 @@ def tree(self) -> List[Self]:
234
"""
235
Return a list of all parent Streams including the node itself.
236
237
- The tree is ordered from child to parent (current node comes first).
+ The tree is ordered from parent to child (current node comes last).
238
:return: a list of `Stream` objects
239
240
+
241
tree_ = [self]
242
node = self
243
while node.parent:
- tree_.insert(0, node.parent)
244
+ tree_.append(node.parent)
245
node = node.parent
246
247
+ # Reverse to get expected ordering.
248
+ tree_.reverse()
249
250
return tree_
251
252
def compose_returning(self) -> ReturningExecutor:
0 commit comments