mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 02:22:25 +01:00
Fixed lines which are mor than 79 characters
This commit is contained in:
parent
4be45eacc6
commit
041adf47ac
1 changed files with 9 additions and 3 deletions
|
|
@ -86,7 +86,9 @@ def resource(name):
|
|||
entities = [entity for entity in entities if entity]
|
||||
|
||||
if len(entities) == 1:
|
||||
return flask.jsonify(_rep(entities[0], expand=is_expand(flask.request.args)))
|
||||
return flask.jsonify(
|
||||
_rep(entities[0], expand=is_expand(flask.request.args))
|
||||
)
|
||||
elif entities:
|
||||
return app.response_class(
|
||||
json_generator(entities, root=name),
|
||||
|
|
@ -105,7 +107,10 @@ def resource_query(name):
|
|||
def make_responder(query_func):
|
||||
def responder(queries):
|
||||
return app.response_class(
|
||||
json_generator(query_func(queries), root='results', expand=is_expand(flask.request.args)),
|
||||
json_generator(
|
||||
query_func(queries),
|
||||
root='results', expand=is_expand(flask.request.args)
|
||||
),
|
||||
mimetype='application/json'
|
||||
)
|
||||
responder.__name__ = 'query_{0}'.format(name)
|
||||
|
|
@ -120,7 +125,8 @@ def resource_list(name):
|
|||
def make_responder(list_all):
|
||||
def responder():
|
||||
return app.response_class(
|
||||
json_generator(list_all(), root=name, expand=is_expand(flask.request.args)),
|
||||
json_generator(list_all(), root=name,
|
||||
expand=is_expand(flask.request.args)),
|
||||
mimetype='application/json'
|
||||
)
|
||||
responder.__name__ = 'all_{0}'.format(name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue