Skip to content

Commit

Permalink
Avoid decimal point and trailing zero for integer BOM quantities
Browse files Browse the repository at this point in the history
Fixes #340
  • Loading branch information
kvid committed Jun 7, 2024
1 parent 7191457 commit db1e77f
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 db1e77f

Please sign in to comment.