Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
jordibc committed Jan 19, 2024
1 parent 0fa2085 commit e27e2f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ete4/core/operations.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def assert_root_consistency(root, bprops=None):
assert s1 == s2, 'inconsistent support at the root: %r != %r' % (s1, s2)


def rehang(root, child_pos, bprops):
def rehang(root, child_pos, bprops=None):
"""Rehang root on its child at position child_pos and return it."""
# root === child -> child === root
child = root.pop_child(child_pos)
Expand All @@ -119,7 +119,7 @@ def rehang(root, child_pos, bprops):

swap_props(root, child, ['dist', 'support'] + (bprops or []))

return child # which is now the parent of its previous parent
return child # which is now the new root


def swap_props(n1, n2, props):
Expand Down

0 comments on commit e27e2f2

Please sign in to comment.