Skip to content

Commit a686c64

Browse files
committed
Move index assignment using POSITIONS
1 parent d6cd31e commit a686c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_ht16k33/segments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,11 @@ def _put(self, char: str, index: int = 0):
350350
# pylint: disable=too-many-return-statements
351351
if not 0 <= index <= 3:
352352
return
353+
index = self.POSITIONS[index]
353354
if self._chardict and char in self._chardict:
354355
self._set_buffer(index, self._chardict[char])
355356
return
356357
char = char.lower()
357-
index = self.POSITIONS[index]
358358
if char == ".":
359359
self._set_buffer(index, self._get_buffer(index) | 0b10000000)
360360
return

0 commit comments

Comments
 (0)