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

Commit 7a39dd0

Browse files
committed
Format changes for black
1 parent 7a4ef7f commit 7a39dd0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_pypixelbuf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,12 @@ def _parse_color(self, value):
253253
# same as math.ceil(brightness * 31) & 0b00011111
254254
# Idea from https://www.codeproject.com/Tips/700780/Fast-floor-ceiling-functions
255255
w = (32 - int(32 - w * 31) & 0b00011111) | DOTSTAR_LED_START
256-
elif self._has_white and (isinstance(value, int) or len(value) == 3) and r == g and g == b:
256+
elif (
257+
self._has_white
258+
and (isinstance(value, int) or len(value) == 3)
259+
and r == g
260+
and g == b
261+
):
257262
# If all components are the same and we have a white pixel then use it
258263
# instead of the individual components when all 4 values aren't explicitly given.
259264
w = r

0 commit comments

Comments
 (0)