Documentation of ping() is not clear
Closed this issue · 2 comments
The issue refers to: https://redis.readthedocs.io/en/stable/commands.html#redis.commands.core.CoreCommands.ping
The documentation of the ping() method is unclear or confusing. According to the documentation, the return value is:
Union[Awaitable, Any]In practice, however, the callback logic always returns a bool by default. See:
I suggest changing the return-type in the documentation to:
Union[Awaitable, bool]It would also be helpful if the mode of operation were also mentioned in the description. Because the current text only refers to the redis.io PING documentation, which says that the return value is a string with the value “PONG”:
Ping the Redis server
For more information see https://redis.io/commands/ping
I would suggest something like:
Ping the Redis server
Send
PING1 command to server and returns booleanTrueif the server's response equals "PONG"2.1For more information on the underlying ping command see https://redis.io/commands/ping
2This default behaviour can be overwritten by setting a custom callback.
Note: This is a follow-up of redis/redis-doc#2717 which wasn't resolved yet, but may not be handled any more as the repository is marked as obsolete.
Hello @codebude. Thank you for reaching out. This repo is for the redis.io/docs site, not the redis-py docs. I suggest you raise this issue on their repo.
Hi @dwdougherty ,
thanks for pointing me into the right direction. I opened an issue over there. (redis/redis-py#3714)