Skip to content

Commit eafb233

Browse files
committed
more linting
1 parent 6212f56 commit eafb233

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ Usage Example
5858
.. code-block:: python
5959
6060
import board
61-
import neopixel
61+
import neopixel_spi
6262
63-
pixels = neopixel.NeoPixel_SPI(board.SPI(), 10)
63+
pixels = neopixel_spi.NeoPixel_SPI(board.SPI(), 10)
6464
pixels.fill(0xff0000)
6565
6666
Contributing

neopixel_spi.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,21 @@
4343
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
4444
"""
4545

46-
from neopixel import neopixel, RGB, GRB, RGBW, GRBW
46+
from neopixel import NeoPixel
4747

4848
__version__ = "0.0.0-auto.0"
4949
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI.git"
5050

51+
# Pixel color order constants
52+
RGB = (0, 1, 2)
53+
"""Red Green Blue"""
54+
GRB = (1, 0, 2)
55+
"""Green Red Blue"""
56+
RGBW = (0, 1, 2, 3)
57+
"""Red Green Blue White"""
58+
GRBW = (1, 0, 2, 3)
59+
"""Green Red Blue White"""
60+
5161
class NeoPixel_SPI(NeoPixel):
5262
"""
5363
A sequence of neopixels.
@@ -66,9 +76,9 @@ class NeoPixel_SPI(NeoPixel):
6676
.. code-block:: python
6777
6878
import board
69-
import neopixel
79+
import neopixel_spi
7080
71-
pixels = neopixel.NeoPixel_SPI(board.SPI(), 10)
81+
pixels = neopixel_spi.NeoPixel_SPI(board.SPI(), 10)
7282
pixels.fill(0xff0000)
7383
"""
7484
#pylint: disable=invalid-name, super-init-not-called

0 commit comments

Comments
 (0)