Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 21, 2025
1 parent 7d677c3 commit 1a94689
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion branca/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ def add_child(
# will now have surprising new behavior

if child._parent is not None:
print("Note: the branca add_child function cloned an element rather than overwrite its existing parent element. This is new behavior as of early 2025. If you got this after issuing a command like my_map.add_child(myElement) and plan to issue a subsequent command like myElement.change(), that subsequent command will not affect the clone. Try either issuing the myElement.change() command first or creating a fresh version of myElement with no parent.")
print(
"Note: the branca add_child function cloned an element rather than overwrite its existing parent element. This is new behavior as of early 2025. If you got this after issuing a command like my_map.add_child(myElement) and plan to issue a subsequent command like myElement.change(), that subsequent command will not affect the clone. Try either issuing the myElement.change() command first or creating a fresh version of myElement with no parent.",
)
child = child.clone()

if name is None:
Expand Down

0 comments on commit 1a94689

Please sign in to comment.