Black
This commit is contained in:
parent
da05dfe708
commit
4de97abc3a
2676 changed files with 163166 additions and 140084 deletions
|
@ -14,12 +14,8 @@ def aiohttp_serialize_response(response: web.Response) -> Dict[str, Any]:
|
|||
# pylint: disable=protected-access
|
||||
body = body._value.decode(body.encoding)
|
||||
elif isinstance(body, bytes):
|
||||
body = body.decode(response.charset or 'utf-8')
|
||||
body = body.decode(response.charset or "utf-8")
|
||||
else:
|
||||
raise ValueError("Unknown payload encoding")
|
||||
|
||||
return {
|
||||
'status': response.status,
|
||||
'body': body,
|
||||
'headers': dict(response.headers),
|
||||
}
|
||||
return {"status": response.status, "body": body, "headers": dict(response.headers)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue