Apply formatting
This commit is contained in:
@@ -27,12 +27,7 @@ class Raspberry:
|
||||
# dede
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
print_queue,
|
||||
app,
|
||||
configuration_file
|
||||
):
|
||||
def __init__(self, print_queue, app, configuration_file):
|
||||
self.print_queue = print_queue
|
||||
self.app = app
|
||||
self.configuration_file = configuration_file
|
||||
@@ -68,7 +63,9 @@ class Raspberry:
|
||||
self.app.logger.warning(
|
||||
"Couldn't get sufficient hardware information from /proc/cpuinfo"
|
||||
)
|
||||
self.app.logger.warning("Unable to determine if we are on a Raspberry Pi.")
|
||||
self.app.logger.warning(
|
||||
"Unable to determine if we are on a Raspberry Pi."
|
||||
)
|
||||
return False
|
||||
except IOError:
|
||||
self.app.logger.error("Unable to open `/proc/cpuinfo`.")
|
||||
@@ -95,13 +92,16 @@ class Raspberry:
|
||||
self.indicator_countdown(iters=3)
|
||||
self.button = Button(
|
||||
self.configuration_file["rpi"]["button_gpio_port_number"],
|
||||
pull_up=True, bounce_time=0.1
|
||||
pull_up=True,
|
||||
bounce_time=0.1,
|
||||
)
|
||||
self.button.when_pressed = self.on_button_pressed
|
||||
self.app.logger.debug("Activated button")
|
||||
|
||||
# The "flash" is a relay-controlled device ( light bulb for example )
|
||||
self.flash = DigitalOutputDevice(self.configuration_file["rpi"]["flash_gpio_port_number"])
|
||||
self.flash = DigitalOutputDevice(
|
||||
self.configuration_file["rpi"]["flash_gpio_port_number"]
|
||||
)
|
||||
self.flash_toggle()
|
||||
self.app.logger.debug("Activated flash")
|
||||
|
||||
@@ -215,9 +215,9 @@ class Raspberry:
|
||||
y = image.height - logo.height - margin
|
||||
else:
|
||||
raise ValueError(
|
||||
"Invalid position." +
|
||||
"Choose from 'bottom_right', 'top_left', " +
|
||||
" 'top_right', or 'bottom_left'."
|
||||
"Invalid position."
|
||||
+ "Choose from 'bottom_right', 'top_left', "
|
||||
+ " 'top_right', or 'bottom_left'."
|
||||
)
|
||||
|
||||
# Composite the logo onto the image
|
||||
|
||||
Reference in New Issue
Block a user