Skip to content

Commit 76ae0c1

Browse files
committed
blackd
1 parent ea1e7a6 commit 76ae0c1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

adafruit_matrixportal/matrixportal.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@ def scroll(self):
361361
return
362362

363363
self._text[self._scrolling_index].x = self._text[self._scrolling_index].x - 1
364-
line_width = self._text[self._scrolling_index].bounding_box[2] * self._text_scale[self._scrolling_index]
364+
line_width = (
365+
self._text[self._scrolling_index].bounding_box[2]
366+
* self._text_scale[self._scrolling_index]
367+
)
365368
if self._text[self._scrolling_index].x < -line_width:
366369
# Find the next line
367370
self._scrolling_index = self._get_next_scrollable_text_index()
@@ -376,7 +379,10 @@ def scroll_text(self, frame_delay=0.02):
376379
return
377380
if self._text[self._scrolling_index] is not None:
378381
self._text[self._scrolling_index].x = self.graphics.display.width
379-
line_width = self._text[self._scrolling_index].bounding_box[2] * self._text_scale[self._scrolling_index]
382+
line_width = (
383+
self._text[self._scrolling_index].bounding_box[2]
384+
* self._text_scale[self._scrolling_index]
385+
)
380386
for _ in range(self.graphics.display.width + line_width + 1):
381387
self.scroll()
382388
sleep(frame_delay)

0 commit comments

Comments
 (0)