Skip to content

Commit ab1b4e3

Browse files
committed
Make accuracy check more generic
1 parent 952e052 commit ab1b4e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

LabelGenerator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def draw_resistor_colorcode(
332332
num_codes: int,
333333
tolerance_value: Optional[float],
334334
) -> None:
335-
if num_codes == 3 and value.ohms_val % 10:
335+
if value.ohms_val % (10 ** (4 - num_codes)):
336336
return
337337

338338
resistance_values: List[int] = []

0 commit comments

Comments
 (0)