Skip to content

Commit

Permalink
PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-congo committed Jun 27, 2024
1 parent 0991f08 commit a64c03b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions python/python/glide/async_commands/cluster_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ async def lolwut(

async def random_key(self, route: Optional[Route] = None) -> Optional[str]:
"""
Returns a random key from currently selected database.
Returns a random existing key name.
See https://valkey.io/commands/randomkey for more details.
Expand All @@ -636,11 +636,11 @@ async def random_key(self, route: Optional[Route] = None) -> Optional[str]:
in which case the client will route the command to the nodes defined by `route`.
Returns:
Optional[str]: A random key from the database.
Optional[str]: A random existing key name.
Examples:
>>> await client.random_key()
"random_key_name" # A random key name that exists in the database.
"random_key_name" # "random_key_name" is a random existing key name.
"""
return cast(
Optional[str],
Expand Down
6 changes: 3 additions & 3 deletions python/python/glide/async_commands/standalone_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,16 +569,16 @@ async def lolwut(

async def random_key(self) -> Optional[str]:
"""
Returns a random key from currently selected database.
Returns a random existing key name from the currently selected database.
See https://valkey.io/commands/randomkey for more details.
Returns:
Optional[str]: A random key from the database.
Optional[str]: A random existing key name from the currently selected database.
Examples:
>>> await client.random_key()
"random_key_name" # A random key name that exists in the database.
"random_key_name" # "random_key_name" is a random existing key name from the currently selected database.
"""
return cast(
Optional[str],
Expand Down
4 changes: 2 additions & 2 deletions python/python/glide/async_commands/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3739,12 +3739,12 @@ def lolwut(

def random_key(self: TTransaction) -> TTransaction:
"""
Returns a random key from currently selected database.
Returns a random existing key name.
See https://valkey.io/commands/randomkey for more details.
Command response:
Optional[str]: A random key from the database.
Optional[str]: A random existing key name.
"""
return self.append_command(RequestType.RandomKey, [])

Expand Down

0 comments on commit a64c03b

Please sign in to comment.