summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros/primitive.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/aperture_macros/primitive.py')
-rw-r--r--gerbonara/aperture_macros/primitive.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gerbonara/aperture_macros/primitive.py b/gerbonara/aperture_macros/primitive.py
index 38bd266..a12a33c 100644
--- a/gerbonara/aperture_macros/primitive.py
+++ b/gerbonara/aperture_macros/primitive.py
@@ -48,7 +48,7 @@ class Primitive:
def to_gerber(self, unit=None):
return f'{self.code},' + ','.join(
- getattr(self, name).to_gerber(unit) for name in type(self).__annotations__)
+ getattr(self, field.name).to_gerber(unit) for field in fields(self) if field.name != 'unit')
def __str__(self):
attrs = ','.join(str(getattr(self, name)).strip('<>') for name in type(self).__annotations__)