Skip to content

Commit

Permalink
drivers/led/neopixel: Fix lint issue.
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Mount <[email protected]>
  • Loading branch information
tmountjr committed Oct 4, 2023
1 parent 6f3ebea commit f683608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions micropython/drivers/led/neopixel/neopixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ class NeoPixel:
# G R B W
ORDER = (1, 0, 2, 3)

def __init__(self, pin, n, bpp=3, timing=1, brightness: float = None):
def __init__(self, pin, n, bpp=3, timing=1, brightness=None):
self.pin = pin
self.n = n
self.bpp = bpp
self.brightness = (
min(max(brightness, 0.0), 1.0) if brightness is not None else None
min(max(float(brightness), 0.0), 1.0) if brightness is not None else None
)
self.buf = bytearray(n * bpp)
self.pin.init(pin.OUT)
Expand Down

0 comments on commit f683608

Please sign in to comment.