Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions LabelGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ def draw_resistor_colorcode(
num_codes: int,
tolerance_value: Optional[float],
) -> None:
# Only display resistors that can accurately represent the given value
if value.ohms_val % (10 ** (4 - num_codes)):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a comment before this if? Like # Only display resistors that can accurately represent the given value.

return

resistance_values: List[int] = []
for i in range(num_codes-1):
Expand Down
Loading