diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index 75b2825..e813fbe 100644 --- a/src/wireviz/DataClasses.py +++ b/src/wireviz/DataClasses.py @@ -7,6 +7,7 @@ from pathlib import Path from wireviz.wv_helper import int2tuple, aspect_ratio from wireviz import wv_colors +# Literal type aliases below are commented to avoid requiring python 3.8 ConnectorMultiplier = str # = Literal['pincount', 'populated'] CableMultiplier = str # = Literal['wirecount', 'terminations', 'length', 'total_length'] @@ -59,7 +60,7 @@ class AdditionalComponent: @property def description(self) -> str: - return self.type.capitalize().strip() + (f', {self.subtype.strip()}' if self.subtype else '') + return self.type.rstrip() + (f', {self.subtype.rstrip()}' if self.subtype else '') @dataclass diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index a8379f7..437ac20 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -342,7 +342,7 @@ class Harness: qty = extra.qty * component.get_qty_multiplier(extra.qty_multiplier) if self.mini_bom_mode: id = self.get_bom_index(extra.description, extra.unit, extra.manufacturer, extra.mpn, extra.pn) - rows.append(component_table_entry(f'#{id} ({extra.type.capitalize().strip()})', qty, extra.unit)) + rows.append(component_table_entry(f'#{id} ({extra.type.rstrip()})', qty, extra.unit)) else: rows.append(component_table_entry(extra.description, qty, extra.unit, extra.pn, extra.manufacturer, extra.mpn)) return(rows)