Skip to content

Commit

Permalink
Avoid decimal point and trailing zero for integer BOM quantities (#374)
Browse files Browse the repository at this point in the history
Fixes #340
  • Loading branch information
kvid committed Jun 11, 2024
1 parent 0aca93e commit 70cd3b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wireviz/wv_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def generate_bom(harness: "Harness") -> List[BOMEntry]:
bom.append(
{
**group_entries[0],
"qty": round(total_qty, 3),
"qty": int(total_qty) if float(total_qty).is_integer() else round(total_qty, 3),
"designators": sorted(set(designators)),
}
)
Expand Down

0 comments on commit 70cd3b1

Please sign in to comment.