Skip to content

Commit

Permalink
fix type of mget
Browse files Browse the repository at this point in the history
Signed-off-by: BoazBD <boazbd@amazon.com>
  • Loading branch information
BoazBD committed Oct 23, 2024
1 parent 5a9e9ac commit 6fbf923
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/python/glide/async_commands/server_modules/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def mget(
keys: List[TEncodable],
paths: Optional[Union[TEncodable, List[TEncodable]]] = None,
options: Optional[JsonGetOptions] = None,
) -> Optional[List[bytes]]:
) -> Optional[List[Optional[bytes]]]:
"""
Retrieves the JSON values at the specified `paths` stored at multiple `keys`.
Expand Down Expand Up @@ -179,9 +179,7 @@ async def mget(
paths = [paths]
args.extend(paths)

results = await client.custom_command(args)
return [result if result is not None else None for result in results]

return cast(List[Optional[bytes]], await client.custom_command(args))

async def arrlen(
client: TGlideClient,
Expand Down

0 comments on commit 6fbf923

Please sign in to comment.