diff --git a/masque/label.py b/masque/label.py index baa7305..fe7d9ab 100644 --- a/masque/label.py +++ b/masque/label.py @@ -71,7 +71,8 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot def __deepcopy__(self: L, memo: Dict = None) -> L: memo = {} if memo is None else memo - new = copy.copy(self).unlock() + new = copy.copy(self) + LockableImpl.unlock(new) new._offset = self._offset.copy() new.set_locked(self.locked) return new diff --git a/masque/repetition.py b/masque/repetition.py index 3b3670e..6861323 100644 --- a/masque/repetition.py +++ b/masque/repetition.py @@ -116,7 +116,8 @@ class Grid(LockableImpl, Repetition, metaclass=AutoSlots): def __deepcopy__(self, memo: Dict = None) -> 'Grid': memo = {} if memo is None else memo - new = copy.copy(self).unlock() + new = copy.copy(self) + LocakbleImpl.unlock(new) new.locked = self.locked return new diff --git a/masque/subpattern.py b/masque/subpattern.py index 39dfa94..ed699da 100644 --- a/masque/subpattern.py +++ b/masque/subpattern.py @@ -101,7 +101,8 @@ class SubPattern(PositionableImpl, DoseableImpl, RotatableImpl, ScalableImpl, Mi def __deepcopy__(self, memo: Dict = None) -> 'SubPattern': memo = {} if memo is None else memo - new = copy.copy(self).unlock() + new = copy.copy(self) + LockableImpl.unlock(new) new.pattern = copy.deepcopy(self.pattern, memo) new.repetition = copy.deepcopy(self.repetition, memo) new.annotations = copy.deepcopy(self.annotations, memo)