Skip to content

Commit 0fab386

Browse files
authored
Merge pull request #38 from kattni/pylint-fix
Pylint fix
2 parents 354c8c9 + 2a4e814 commit 0fab386

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ deploy:
2323

2424
install:
2525
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme
26+
- pip install --force-reinstall pylint==1.9.2
2627

2728
script:
2829
- pylint adafruit_circuitplayground/*.py

examples/pixels_simpletest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
import time
44
from adafruit_circuitplayground.express import cpx
55

6-
76
# The number of pixels in the strip
87
numpix = 10
98

9+
1010
def wheel(pos):
1111
# Input a value 0 to 255 to get a color value.
1212
# The colours are a transition r - g - b - back to r.
1313
if (pos < 0) or (pos > 255):
1414
return (0, 0, 0)
1515
if pos < 85:
1616
return (int(pos * 3), int(255 - (pos*3)), 0)
17-
elif pos < 170:
17+
if pos < 170:
1818
pos -= 85
1919
return (int(255 - pos*3), 0, int(pos*3))
20-
#else:
2120
pos -= 170
2221
return (0, int(pos*3), int(255 - pos*3))
2322

23+
2424
def rainbow_cycle(wait):
2525
for j in range(255):
2626
for i in range(cpx.pixels.n):
@@ -29,6 +29,7 @@ def rainbow_cycle(wait):
2929
cpx.pixels.show()
3030
time.sleep(wait)
3131

32+
3233
cpx.pixels.auto_write = False
3334
cpx.pixels.brightness = 0.3
3435
while True:

0 commit comments

Comments
 (0)