This commit is contained in:
Kattni Rembor 2018-05-29 15:15:33 -04:00
parent d11026dc22
commit 4c43ce978e
5 changed files with 11 additions and 3 deletions

View file

@ -127,6 +127,7 @@ def lerp(x, x0, x1, y0, y1):
return y0 + (x - x0) * ((y1 - y0) / (x1 - x0)) return y0 + (x - x0) * ((y1 - y0) / (x1 - x0))
# pylint: disable=redefined-outer-name
# Main loop below will run forever: # Main loop below will run forever:
while True: while True:
# Get the current time at the start of the animation update. # Get the current time at the start of the animation update.

View file

@ -131,6 +131,7 @@ beat_phase = beat_period / 5.0 # Phase controls how long in-between
# the two parts of the heart beat # the two parts of the heart beat
# (the 'ba-boom' of the beat). # (the 'ba-boom' of the beat).
# pylint: disable=redefined-outer-name
# Define a gamma correction lookup table to make colors more accurate. # Define a gamma correction lookup table to make colors more accurate.
# See this guide for more background on gamma correction: # See this guide for more background on gamma correction:
# https://learn.adafruit.com/led-tricks-gamma-correction/ # https://learn.adafruit.com/led-tricks-gamma-correction/

View file

@ -55,7 +55,8 @@ class DirectoryNode(object):
self.files = None self.files = None
return self return self
def __is_dir(self, path): @staticmethod
def __is_dir(path):
"""Determine whether a path identifies a machine code bin file. """Determine whether a path identifies a machine code bin file.
:param string path: path of the file to check :param string path: path of the file to check
""" """
@ -67,7 +68,8 @@ class DirectoryNode(object):
except OSError: except OSError:
return False return False
def __sanitize(self, name): @staticmethod
def __sanitize(name):
"""Nondestructively strip off a trailing slash, if any, and return the result. """Nondestructively strip off a trailing slash, if any, and return the result.
:param string name: the filename :param string name: the filename
""" """
@ -75,6 +77,7 @@ class DirectoryNode(object):
return name[:-1] return name[:-1]
return name return name
# pylint: disable=protected-access
def __path(self): def __path(self):
"""Return the result of recursively follow the parent links, building a full """Return the result of recursively follow the parent links, building a full
path to this directory.""" path to this directory."""
@ -133,7 +136,8 @@ class DirectoryNode(object):
self.display.show() self.display.show()
self.old_selected_offset = self.selected_offset self.old_selected_offset = self.selected_offset
def __is_directory_name(self, filename): @staticmethod
def __is_directory_name(filename):
"""Is a filename the name of a directory. """Is a filename the name of a directory.
:param string filename: the name of the file :param string filename: the name of the file
""" """

View file

@ -120,6 +120,7 @@ def display_emulating_screen():
oled.show() oled.show()
#pylint disable=global-statement
def emulate(): def emulate():
global current_mode global current_mode
data = load_file(current_dir.selected_filepath) data = load_file(current_dir.selected_filepath)

View file

@ -58,6 +58,7 @@ pause = 0.25
# The functions that follow are the various payloads to deliver # The functions that follow are the various payloads to deliver
# pylint: disable=too-many-statements
def launch_terminal(): def launch_terminal():
if operating_system is 0: if operating_system is 0:
led.value = False led.value = False