Skip to content

Commit

Permalink
Remove WITH_VALUES constant
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-congo committed Apr 30, 2024
1 parent dbb27fc commit b83e734
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions python/python/glide/async_commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,6 @@ async def hrandfield_count(self, key: str, count: int) -> List[str]:
await self._execute_command(RequestType.HRandField, [key, str(count)]),
)

WITH_VALUES: str = "WITHVALUES"

async def hrandfield_withvalues(self, key: str, count: int) -> List[List[str]]:
"""
Retrieves up to `count` random field names along with their values from the hash value stored at `key`.
Expand All @@ -905,7 +903,7 @@ async def hrandfield_withvalues(self, key: str, count: int) -> List[List[str]]:
return cast(
List[List[str]],
await self._execute_command(
RequestType.HRandField, [key, str(count), self.WITH_VALUES]
RequestType.HRandField, [key, str(count), "WITHVALUES"]
),
)

Expand Down
3 changes: 1 addition & 2 deletions python/python/glide/async_commands/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from glide.async_commands.core import (
ConditionalChange,
CoreCommands,
ExpireOptions,
ExpirySet,
GeospatialData,
Expand Down Expand Up @@ -660,7 +659,7 @@ def hrandfield_withvalues(self: TTransaction, key: str, count: int) -> TTransact
If the hash does not exist or is empty, the response will be an empty list.
"""
return self.append_command(
RequestType.HRandField, [key, str(count), CoreCommands.WITH_VALUES]
RequestType.HRandField, [key, str(count), "WITHVALUES"]
)

def lpush(self: TTransaction, key: str, elements: List[str]) -> TTransaction:
Expand Down

0 comments on commit b83e734

Please sign in to comment.