Skip to content

Commit

Permalink
fix: fix codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
kayjan committed Dec 26, 2024
1 parent 7cdf0b9 commit 5fe5954
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bigtree/tree/modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,12 +1313,6 @@ def copy_or_shift_logic(
f"Path {to_path} already exists and leaves are merged"
)
else:
if not (overriding or merge_attribute):
raise exceptions.TreeError(
f"Path {to_path} already exists and unable to override\n"
f"Set `overriding` or `merge_attribute` to True to handle node name clashes\n"
f"Alternatively, set `merge_children` to True if nodes are to be merged"
)
if overriding:
logging.info(
f"Path {to_path} already exists and will be overridden"
Expand All @@ -1340,6 +1334,12 @@ def copy_or_shift_logic(
parent = to_node.parent
to_node.parent = None
to_node = parent
else:
raise exceptions.TreeError(
f"Path {to_path} already exists and unable to override\n"
f"Set `overriding` or `merge_attribute` to True to handle node name clashes\n"
f"Alternatively, set `merge_children` to True if nodes are to be merged"
)

# To node not found
else:
Expand Down

0 comments on commit 5fe5954

Please sign in to comment.