Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Commit b7ef5e3

Browse files
authored
Merge pull request #6 from jepler/no-re
remove need for `re` module
2 parents ec93a6a + a15ff7a commit b7ef5e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_pypixelbuf.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
3030
* Author(s): Damien P. George & Limor Fried & Scott Shawcroft & Roy Hooper
3131
"""
32-
import re
3332

3433
DOTSTAR_LED_START_FULL_BRIGHT = 0xFF
3534
DOTSTAR_LED_START = 0b11100000 # Three "1" bits, followed by 5 brightness bits
@@ -120,7 +119,7 @@ def parse_byteorder(byteorder):
120119
dotstar_mode = False
121120
has_white = False
122121

123-
if re.search(r'[^RGBWP]', byteorder):
122+
if byteorder.strip("RGBWP") != "":
124123
raise ValueError("Invalid Byteorder string")
125124

126125
try:

0 commit comments

Comments
 (0)