Use assignment expressions 05 (#57785)
This commit is contained in:
parent
d09ee11c54
commit
5048bad050
19 changed files with 36 additions and 71 deletions
|
@ -8,9 +8,7 @@ from aiohttp import payload, web
|
|||
|
||||
def aiohttp_serialize_response(response: web.Response) -> dict[str, Any]:
|
||||
"""Serialize an aiohttp response to a dictionary."""
|
||||
body = response.body
|
||||
|
||||
if body is None:
|
||||
if (body := response.body) is None:
|
||||
pass
|
||||
elif isinstance(body, payload.StringPayload):
|
||||
# pylint: disable=protected-access
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue