Skip to content

Commit 39c8bc7

Browse files
authored
Merge pull request #2406 from adafruit/TheKitty-patch-3
Fix pylint errors that cropped up
2 parents a85ac67 + 6239098 commit 39c8bc7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

WS2801_LED_Menorah/code.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
# pixel setup
1818
pixel_num = 9
1919
pixel_offset = 2
20-
pixels = adafruit_ws2801.WS2801(board.SDA1, board.SCL1, pixel_num+pixel_offset, brightness=1, auto_write=False)
20+
pixels = adafruit_ws2801.WS2801(board.SDA1, board.SCL1, pixel_num+pixel_offset, brightness=1,
21+
auto_write=False)
2122

2223
pixel_prev = [128] * len(pixels)
2324

@@ -33,14 +34,16 @@ def split(first, second, offset):
3334
@param1 second: Ending brightness value.
3435
@param1 offset: Midpoint offset range is +/- this amount max.
3536
"""
37+
thelevel = 0
3638
if offset != 0:
3739
mid = ((first + second + 1) / 2 + random.randint(-offset, offset))
3840
offset = int(offset / 2)
3941
split(first, mid, offset)
4042
split(mid, second, offset)
4143
else:
42-
level = math.pow(first / 255.0, 2.7) * 255.0 + 0.5
43-
return level
44+
thelevel = math.pow(first / 255.0, 2.7) * 255.0 + 0.5
45+
return thelevel
46+
return thelevel
4447

4548
while True:
4649
if not button.value:

0 commit comments

Comments
 (0)