Skip to content

Commit

Permalink
Black cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedb committed Aug 21, 2020
1 parent b6b2f66 commit 177dce8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mopidy_iris/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def start(self):
logger.info("Starting Iris " + Extension.version)

# Load our commands from file
self.data['commands'] = self.load_from_file("commands")
self.data["commands"] = self.load_from_file("commands")

##
# Mopidy is shutting down
Expand Down Expand Up @@ -869,27 +869,27 @@ def set_data(self, name, *args, **kwargs):
##

def get_pinned(self, *args, **kwargs):
return self.get_data('pinned', *args, **kwargs)
return self.get_data("pinned", *args, **kwargs)

def set_pinned(self, *args, **kwargs):
return self.set_data('pinned', *args, **kwargs)
return self.set_data("pinned", *args, **kwargs)

##
# Commands
##

def get_commands(self, *args, **kwargs):
return self.get_data('commands', *args, **kwargs)
return self.get_data("commands", *args, **kwargs)

def set_commands(self, *args, **kwargs):
return self.set_data('commands', *args, **kwargs)
return self.set_data("commands", *args, **kwargs)

async def run_command(self, *args, **kwargs):
callback = kwargs.get("callback", False)
data = kwargs.get("data", {})
error = False

if str(data["id"]) not in self.data['commands']:
if str(data["id"]) not in self.data["commands"]:
error = {
"message": "Command failed",
"description": "Could not find command by ID "
Expand All @@ -898,7 +898,7 @@ async def run_command(self, *args, **kwargs):
+ '"',
}
else:
command = self.data['commands'][str(data["id"])]
command = self.data["commands"][str(data["id"])]
if "method" not in command:
error = {
"message": "Command failed",
Expand Down

0 comments on commit 177dce8

Please sign in to comment.