linting
This commit is contained in:
parent
d11026dc22
commit
4c43ce978e
5 changed files with 11 additions and 3 deletions
|
|
@ -127,6 +127,7 @@ def lerp(x, x0, x1, y0, y1):
|
|||
return y0 + (x - x0) * ((y1 - y0) / (x1 - x0))
|
||||
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
# Main loop below will run forever:
|
||||
while True:
|
||||
# Get the current time at the start of the animation update.
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ beat_phase = beat_period / 5.0 # Phase controls how long in-between
|
|||
# the two parts of the heart beat
|
||||
# (the 'ba-boom' of the beat).
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
# Define a gamma correction lookup table to make colors more accurate.
|
||||
# See this guide for more background on gamma correction:
|
||||
# https://learn.adafruit.com/led-tricks-gamma-correction/
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ class DirectoryNode(object):
|
|||
self.files = None
|
||||
return self
|
||||
|
||||
def __is_dir(self, path):
|
||||
@staticmethod
|
||||
def __is_dir(path):
|
||||
"""Determine whether a path identifies a machine code bin file.
|
||||
:param string path: path of the file to check
|
||||
"""
|
||||
|
|
@ -67,7 +68,8 @@ class DirectoryNode(object):
|
|||
except OSError:
|
||||
return False
|
||||
|
||||
def __sanitize(self, name):
|
||||
@staticmethod
|
||||
def __sanitize(name):
|
||||
"""Nondestructively strip off a trailing slash, if any, and return the result.
|
||||
:param string name: the filename
|
||||
"""
|
||||
|
|
@ -75,6 +77,7 @@ class DirectoryNode(object):
|
|||
return name[:-1]
|
||||
return name
|
||||
|
||||
# pylint: disable=protected-access
|
||||
def __path(self):
|
||||
"""Return the result of recursively follow the parent links, building a full
|
||||
path to this directory."""
|
||||
|
|
@ -133,7 +136,8 @@ class DirectoryNode(object):
|
|||
self.display.show()
|
||||
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.
|
||||
:param string filename: the name of the file
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ def display_emulating_screen():
|
|||
oled.show()
|
||||
|
||||
|
||||
#pylint disable=global-statement
|
||||
def emulate():
|
||||
global current_mode
|
||||
data = load_file(current_dir.selected_filepath)
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ pause = 0.25
|
|||
# The functions that follow are the various payloads to deliver
|
||||
|
||||
|
||||
# pylint: disable=too-many-statements
|
||||
def launch_terminal():
|
||||
if operating_system is 0:
|
||||
led.value = False
|
||||
|
|
|
|||
Loading…
Reference in a new issue