summaryrefslogtreecommitdiff
path: root/gerbonara/excellon.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/excellon.py')
-rwxr-xr-xgerbonara/excellon.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/gerbonara/excellon.py b/gerbonara/excellon.py
index ea5eba4..31ff53f 100755
--- a/gerbonara/excellon.py
+++ b/gerbonara/excellon.py
@@ -207,18 +207,21 @@ class ExcellonFile(CamFile):
def __str__(self):
name = f'{self.original_path.name} ' if self.original_path else ''
+ return f'<ExcellonFile {name}{self.plating_type} with {len(list(self.drills()))} drills, {len(list(self.slots()))} slots using {len(self.drill_sizes())} tools>'
+
+ def __repr__(self):
+ return str(self)
+
+ @property
+ def plating_type(self):
if self.is_plated:
- plating = 'plated'
+ return 'plated'
elif self.is_nonplated:
- plating = 'nonplated'
+ return 'nonplated'
elif self.is_mixed_plating:
- plating = 'mixed plating'
+ return 'mixed plating'
else:
- plating = 'unknown plating'
- return f'<ExcellonFile {name}{plating} with {len(list(self.drills()))} drills, {len(list(self.slots()))} slots using {len(self.drill_sizes())} tools>'
-
- def __repr__(self):
- return str(self)
+ return 'unknown plating'
@property
def is_plated(self):