-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
Whilst updating pre-commit (#207) it detected this line: tsdate/prior.py:658
Here's the surrounding snippet, it looks like a mistake:
# Add unary nodes below the altered ones, as their result is calculated
# from the coalescent node above
unary_descendants = set()
for node in changed_nodes:
children = prev_tree.children(node)
if children is not None:
if len(children) == 1:
# Keep descending
node == children[0] <-------- NOTE ==
while True:
children = prev_tree.children(node)
if len(children) != 1:
break
unary_descendants.add(node)
node = children[0]
else:
# Descend all branches, looking for unary nodes
for node in prev_tree.children(node):
while True:
children = prev_tree.children(node)
if len(children) != 1:
break
unary_descendants.add(node)
node = children[0]
Metadata
Metadata
Assignees
Labels
No labels