get rid of "identifier"

This commit is contained in:
Jan Petykiewicz 2023-01-18 17:14:35 -08:00 committed by jan
commit a0ca53f57a
9 changed files with 2 additions and 23 deletions

View file

@ -167,7 +167,6 @@ class Arc(Shape, metaclass=AutoSlots):
annotations: Optional[annotations_t] = None,
raw: bool = False,
) -> None:
self.identifier = ()
if raw:
assert(isinstance(radii, numpy.ndarray))
assert(isinstance(angles, numpy.ndarray))

View file

@ -55,7 +55,6 @@ class Circle(Shape, metaclass=AutoSlots):
annotations: Optional[annotations_t] = None,
raw: bool = False,
) -> None:
self.identifier = ()
if raw:
assert(isinstance(offset, numpy.ndarray))
self._radius = radius

View file

@ -102,7 +102,6 @@ class Ellipse(Shape, metaclass=AutoSlots):
annotations: Optional[annotations_t] = None,
raw: bool = False,
) -> None:
self.identifier = ()
if raw:
assert(isinstance(radii, numpy.ndarray))
assert(isinstance(offset, numpy.ndarray))

View file

@ -158,7 +158,6 @@ class Path(Shape, metaclass=AutoSlots):
) -> None:
self._cap_extensions = None # Since .cap setter might access it
self.identifier = ()
if raw:
assert(isinstance(vertices, numpy.ndarray))
assert(isinstance(offset, numpy.ndarray))

View file

@ -84,7 +84,6 @@ class Polygon(Shape, metaclass=AutoSlots):
annotations: Optional[annotations_t] = None,
raw: bool = False,
) -> None:
self.identifier = ()
if raw:
assert(isinstance(vertices, numpy.ndarray))
assert(isinstance(offset, numpy.ndarray))

View file

@ -34,9 +34,6 @@ class Shape(PositionableImpl, LayerableImpl, DoseableImpl, Rotatable, Mirrorable
"""
__slots__ = () # Children should use AutoSlots
identifier: Tuple
""" An arbitrary identifier for the shape, usually empty but used by `Pattern.flatten()` """
def __copy__(self) -> 'Shape':
cls = self.__class__
new = cls.__new__(cls)

View file

@ -75,7 +75,6 @@ class Text(RotatableImpl, Shape, metaclass=AutoSlots):
annotations: Optional[annotations_t] = None,
raw: bool = False,
) -> None:
self.identifier = ()
if raw:
assert(isinstance(offset, numpy.ndarray))
assert(isinstance(mirrored, numpy.ndarray))