Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix some pylint issues
  • Loading branch information
PaintYourDragon committed Dec 29, 2021
commit b5d42573fe26b8342ce8ce2f46fe8f14a525702e
9 changes: 4 additions & 5 deletions adafruit_fancyled/adafruit_fancyled.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def __init__(self, red, green=0.0, blue=0.0):
self.blue = ((b * hsv.saturation) + invsat) * hsv.value
else:
# Red, green, blue arguments (normalized floats OR integers)
self.red = clamp_norm(red);
self.green = clamp_norm(green);
self.blue = clamp_norm(blue);
self.red = clamp_norm(red)
self.green = clamp_norm(green)
self.blue = clamp_norm(blue)

def __repr__(self): # pylint: disable=invalid-repr-returned
return (self.red, self.green, self.blue)
Expand Down Expand Up @@ -267,8 +267,7 @@ def clamp_norm(val):
"""
if isinstance(val, float):
return clamp(val, 0.0, 1.0)
else:
return normalize(val)
return normalize(val)


def denormalize(val, inplace=False):
Expand Down