From 54f3b273bcf74e7e63edf393614bf48474238832 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sat, 14 Feb 2026 18:53:23 -0800 Subject: [PATCH] [Label] don't drop annotations when copying --- masque/label.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/masque/label.py b/masque/label.py index 711ef35..89f0384 100644 --- a/masque/label.py +++ b/masque/label.py @@ -58,12 +58,14 @@ class Label(PositionableImpl, RepeatableImpl, AnnotatableImpl, Bounded, Pivotabl string=self.string, offset=self.offset.copy(), repetition=self.repetition, + annotations=copy.copy(self.annotations), ) def __deepcopy__(self, memo: dict | None = None) -> Self: memo = {} if memo is None else memo new = copy.copy(self) new._offset = self._offset.copy() + new._annotations = copy.deepcopy(self._annotations, memo) return new def __lt__(self, other: 'Label') -> bool: