From ef8bf778da3275f519a408c3cd0dd8f95566e89e Mon Sep 17 00:00:00 2001 From: fa1l Date: Mon, 6 May 2019 23:03:44 +0500 Subject: [PATCH] [3.5] fixed return type annotation for WSMessage.json() (#3720) (cherry picked from commit ad2c1872) Co-authored-by: fa1l --- CHANGES/3720.bugfix | 1 + CONTRIBUTORS.txt | 1 + aiohttp/http_websocket.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 CHANGES/3720.bugfix diff --git a/CHANGES/3720.bugfix b/CHANGES/3720.bugfix new file mode 100644 index 00000000000..f02318f417e --- /dev/null +++ b/CHANGES/3720.bugfix @@ -0,0 +1 @@ +Fixed return type annotation for WSMessage.json() diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 71febf02340..b97af402b7b 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -199,6 +199,7 @@ Simon Kennedy Sin-Woo Bang Stanislas Plum Stanislav Prokop +Stepan Pletnev Stephen Granade Steven Seguin Sunghyun Hwang diff --git a/aiohttp/http_websocket.py b/aiohttp/http_websocket.py index d8fc10f4567..f27c547f49d 100644 --- a/aiohttp/http_websocket.py +++ b/aiohttp/http_websocket.py @@ -83,7 +83,7 @@ class WSMsgType(IntEnum): class WSMessage(_WSMessageBase): def json(self, *, # type: ignore - loads: Callable[[Any], Any]=json.loads) -> None: + loads: Callable[[Any], Any]=json.loads) -> Any: """Return parsed JSON data. .. versionadded:: 0.22