Remove aditional component type capitilisation and swap to rstrip.
This commit is contained in:
parent
052348cd54
commit
4eeff65cf1
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user