Skip to content

Commit 6dd627f

Browse files
committed
fixed formatting overzealousity
1 parent 0bcea91 commit 6dd627f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

adk/ADK.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ def __init__(self, apply_func, load_func=None):
2525
else:
2626
self.load_func = None
2727
if len(apply_args) > 2 or len(apply_args) == 0:
28-
raise Exception(
29-
"apply function may have between 1 and 2 parameters, not {}".format(
30-
len(apply_args)
31-
)
32-
)
28+
raise Exception("apply function may have between 1 and 2 parameters, not {}".format(len(apply_args)))
3329
self.apply_func = apply_func
3430
self.is_local = not os.path.exists(self.FIFO_PATH)
3531
self.load_result = None
@@ -67,14 +63,17 @@ def format_response(self, response):
6763
if self.is_binary(response):
6864
content_type = "binary"
6965
response = str(base64.b64encode(response), "utf-8")
70-
elif isinstance(response, six.string_types) or isinstance(
71-
response, six.text_type
72-
):
66+
elif isinstance(response, six.string_types) or isinstance(response, six.text_type):
7367
content_type = "text"
7468
else:
7569
content_type = "json"
7670
response_string = json.dumps(
77-
{"result": response, "metadata": {"content_type": content_type}}
71+
{
72+
"result": response,
73+
"metadata": {
74+
"content_type": content_type
75+
}
76+
}
7877
)
7978
return response_string
8079

0 commit comments

Comments
 (0)