Skip to content

Commit db1e77f

Browse files
committed
Avoid decimal point and trailing zero for integer BOM quantities
Fixes #340
1 parent 7191457 commit db1e77f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wireviz/wv_bom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def generate_bom(harness: "Harness") -> List[BOMEntry]:
204204
bom.append(
205205
{
206206
**group_entries[0],
207-
"qty": round(total_qty, 3),
207+
"qty": int(total_qty) if float(total_qty).is_integer() else round(total_qty, 3),
208208
"designators": sorted(set(designators)),
209209
}
210210
)

0 commit comments

Comments
 (0)