linting sms project
This commit is contained in:
parent
92633f7e03
commit
4078feee94
2 changed files with 6 additions and 5 deletions
|
|
@ -9,9 +9,9 @@
|
|||
# avoids repeating the same quote twice in a row
|
||||
|
||||
import time
|
||||
import board
|
||||
import random
|
||||
from collections import deque
|
||||
import board
|
||||
from adafruit_matrixportal.matrix import Matrix
|
||||
from adafruit_matrixportal.network import Network
|
||||
from messageboard import MessageBoard
|
||||
|
|
@ -76,8 +76,8 @@ def update_data():
|
|||
|
||||
# Results are returned in reverse order, so we reverse that and add to end of queue
|
||||
messages.reverse()
|
||||
for message in messages:
|
||||
message_queue.append(message)
|
||||
for m in messages:
|
||||
message_queue.append(m)
|
||||
|
||||
# Remove any messages that have been grabbed except the latest one if setting enabled
|
||||
start_index = 1 if KEEP_LATEST_MESSAGE else 0
|
||||
|
|
|
|||
|
|
@ -171,14 +171,15 @@ class Scroll(Animation):
|
|||
)
|
||||
|
||||
def right_to_left(self, message, duration=1):
|
||||
"""Scroll a message in from the right side of the display and then out the left side over a certain period of
|
||||
time. The final position is off-screen to the left.
|
||||
"""Scroll a message in from the right side of the display and then out the left side
|
||||
over a certain period of time. The final position is off-screen to the left.
|
||||
|
||||
:param message: The message to animate.
|
||||
:param float duration: (optional) The period of time to perform the animation
|
||||
over in seconds. (default=1)
|
||||
:type message: Message
|
||||
"""
|
||||
# pylint: disable=unused-variable
|
||||
center_x, center_y = self._get_centered_position(message)
|
||||
self.scroll_from_to(
|
||||
message, duration,
|
||||
|
|
|
|||
Loading…
Reference in a new issue