type-related fixes and improvements

This commit is contained in:
Jan Petykiewicz 2020-11-09 22:04:04 -08:00
commit 09a5e4a2db
5 changed files with 17 additions and 16 deletions

View file

@ -58,11 +58,11 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot
self.set_locked(locked)
def __copy__(self: L) -> L:
return Label(string=self.string,
offset=self.offset.copy(),
layer=self.layer,
repetition=self.repetition,
locked=self.locked)
return type(self)(string=self.string,
offset=self.offset.copy(),
layer=self.layer,
repetition=self.repetition,
locked=self.locked)
def __deepcopy__(self: L, memo: Dict = None) -> L:
memo = {} if memo is None else memo