Greg Ward
|
603458ba09
|
Fix some incorrect/incomplete annotations for redis.client.PubSub (#3408)
* redis: Fix return value declarations in redis.client.PubSub
get_message() was declared incorrectly. Start here:
https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3298-L3300
where it's obvious that get_message() returns either None or the
output of handle_message().
So what does handle_message() return? Combine:
https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3316-L3336
https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3366
and you can see it returns None or a dict mapping str to something.
* redis: Fix incorrect declaration for PubSub.get_message() argument
Docstrings says it's a float:
https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/client.py#L3293-L3295
And it eventually gets passed to settimeout() on a socket:
https://github.com/andymccurdy/redis-py/blob/3.3.11/redis/connection.py#L182
* redis: Annotate one more method arg in PubSub class
get_message() and handle_message() are closely related:
ignore_subscribe_message does the same in both, and its default value
in both is False.
|
2019-10-30 07:33:00 -07:00 |
|