diff --git a/src/black/__init__.py b/src/black/__init__.py index 930f2cb0ae5..7ce2ac896b3 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -4594,8 +4594,6 @@ def append_leaves(new_line: Line, old_line: Line, leaves: List[Leaf]) -> None: set(@leaves) is a subset of set(@old_line.leaves). """ for old_leaf in leaves: - assert old_leaf in old_line.leaves - new_leaf = Leaf(old_leaf.type, old_leaf.value) replace_child(old_leaf, new_leaf) new_line.append(new_leaf)