Black take two; Moving excludes into setup.cfg
This commit is contained in:
@ -811,9 +811,7 @@ class IrisCore(pykka.ThreadingActor):
|
|||||||
self.broadcast(
|
self.broadcast(
|
||||||
data={
|
data={
|
||||||
"method": "queue_metadata_changed",
|
"method": "queue_metadata_changed",
|
||||||
"params": {
|
"params": {"queue_metadata": self.queue_metadata},
|
||||||
"queue_metadata": self.queue_metadata
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -865,9 +863,7 @@ class IrisCore(pykka.ThreadingActor):
|
|||||||
self.broadcast(
|
self.broadcast(
|
||||||
data={
|
data={
|
||||||
"method": "commands_changed",
|
"method": "commands_changed",
|
||||||
"params": {
|
"params": {"commands": self.commands},
|
||||||
"commands": self.commands
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -886,7 +882,9 @@ class IrisCore(pykka.ThreadingActor):
|
|||||||
error = {
|
error = {
|
||||||
"message": "Command failed",
|
"message": "Command failed",
|
||||||
"description": "Could not find command by ID "
|
"description": "Could not find command by ID "
|
||||||
+ '"' + str(data["id"]) + '"',
|
+ '"'
|
||||||
|
+ str(data["id"])
|
||||||
|
+ '"',
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
command = self.commands[str(data["id"])]
|
command = self.commands[str(data["id"])]
|
||||||
@ -1030,9 +1028,7 @@ class IrisCore(pykka.ThreadingActor):
|
|||||||
self.broadcast(
|
self.broadcast(
|
||||||
data={
|
data={
|
||||||
"method": "spotify_token_changed",
|
"method": "spotify_token_changed",
|
||||||
"params": {
|
"params": {"spotify_token": self.spotify_token},
|
||||||
"spotify_token": self.spotify_token
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -101,13 +101,10 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
getattr(
|
getattr(iris, message["method"])(
|
||||||
iris,
|
|
||||||
message["method"])(
|
|
||||||
ioloop=self.ioloop,
|
ioloop=self.ioloop,
|
||||||
data=params,
|
data=params,
|
||||||
callback=lambda response,
|
callback=lambda response, error=False: self.handle_result(
|
||||||
error=False: self.handle_result(
|
|
||||||
id=id,
|
id=id,
|
||||||
method=message["method"],
|
method=message["method"],
|
||||||
response=response,
|
response=response,
|
||||||
@ -214,17 +211,12 @@ class HttpHandler(tornado.web.RequestHandler):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
getattr(
|
getattr(iris, slug)(
|
||||||
iris,
|
|
||||||
slug)(
|
|
||||||
ioloop=self.ioloop,
|
ioloop=self.ioloop,
|
||||||
request=self,
|
request=self,
|
||||||
callback=lambda response,
|
callback=lambda response, error=False: self.handle_result(
|
||||||
error=False: self.handle_result(
|
id=id, method=slug, response=response, error=error
|
||||||
id=id,
|
),
|
||||||
method=slug,
|
|
||||||
response=response,
|
|
||||||
error=error),
|
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
@ -264,17 +256,12 @@ class HttpHandler(tornado.web.RequestHandler):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
getattr(
|
getattr(iris, slug)(
|
||||||
iris,
|
|
||||||
slug)(
|
|
||||||
data=params,
|
data=params,
|
||||||
request=self.request,
|
request=self.request,
|
||||||
callback=lambda response=False,
|
callback=lambda response=False, error=False: self.handle_result(
|
||||||
error=False: self.handle_result(
|
id=id, method=slug, response=response, error=error
|
||||||
id=id,
|
),
|
||||||
method=slug,
|
|
||||||
response=response,
|
|
||||||
error=error),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
except tornado.web.HTTPError:
|
except tornado.web.HTTPError:
|
||||||
|
|||||||
31
setup.cfg
31
setup.cfg
@ -64,7 +64,6 @@ mopidy.ext =
|
|||||||
[flake8]
|
[flake8]
|
||||||
application-import-names = mopidy_iris, tests
|
application-import-names = mopidy_iris, tests
|
||||||
max-line-length = 80
|
max-line-length = 80
|
||||||
exclude = .git, .tox, build
|
|
||||||
select =
|
select =
|
||||||
# Regular flake8 rules
|
# Regular flake8 rules
|
||||||
C, E, F, W
|
C, E, F, W
|
||||||
@ -83,3 +82,33 @@ ignore =
|
|||||||
W503
|
W503
|
||||||
# B305: .next() is not a thing on Python 3 (used by playback controller)
|
# B305: .next() is not a thing on Python 3 (used by playback controller)
|
||||||
B305
|
B305
|
||||||
|
exclude =
|
||||||
|
.circleci,
|
||||||
|
.git,
|
||||||
|
.tox,
|
||||||
|
.vscode,
|
||||||
|
docs,
|
||||||
|
tests,
|
||||||
|
src,
|
||||||
|
node_modules,
|
||||||
|
build_tools,
|
||||||
|
docker,
|
||||||
|
Screenshots
|
||||||
|
|
||||||
|
[check-manifest]
|
||||||
|
ignore =
|
||||||
|
build_tools
|
||||||
|
build_tools/*
|
||||||
|
docker
|
||||||
|
docker/*
|
||||||
|
Screenshots
|
||||||
|
Screenshots/*
|
||||||
|
src
|
||||||
|
src/*
|
||||||
|
.circleci
|
||||||
|
.circleci/*
|
||||||
|
.dockerignore
|
||||||
|
.htaccess
|
||||||
|
.vscode
|
||||||
|
.vscode/*
|
||||||
|
.dockerignore
|
||||||
Reference in New Issue
Block a user