black -t py34

This commit is contained in:
LtPeriwinkle 2020-06-24 12:22:03 -07:00
parent e1a9782458
commit 7215a11ffe

View file

@ -5,6 +5,7 @@ import core.module
import core.widget
import core.input
import core.decorators
"""Displays the current song being played and allows pausing, skipping ahead, and skipping back.
Requires the following library:
@ -17,11 +18,15 @@ Parameters:
Widget names are: spotify-buttons.song, spotify-buttons.prev, spotify-buttons.pause, spotify-buttons.next
"""
class Module(core.module.Module):
def __init__(self, config, theme):
super().__init__(config, theme, [])
self.__layout = self.parameter("layout", "spotify-buttons.song spotify-buttons.prev spotify-buttons.pause spotify-buttons.next")
self.__layout = self.parameter(
"layout",
"spotify-buttons.song spotify-buttons.prev spotify-buttons.pause spotify-buttons.next",
)
self.__song = ""
self.__pause = ""
@ -81,7 +86,9 @@ class Module(core.module.Module):
widget.full_text(self.__song)
else:
raise KeyError(
"The spotify-buttons module does not have a {widget_name!r} widget".format(widget_name=widget_name)
"The spotify-buttons module does not have a {widget_name!r} widget".format(
widget_name=widget_name
)
)
for widget, callback_options in widget_map.items():
core.input.register(widget, **callback_options)