From 6fbf9230c06ae2226f2021e1fefcbc387689067a Mon Sep 17 00:00:00 2001 From: BoazBD Date: Wed, 23 Oct 2024 08:24:50 +0000 Subject: [PATCH] fix type of mget Signed-off-by: BoazBD --- python/python/glide/async_commands/server_modules/json.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/python/glide/async_commands/server_modules/json.py b/python/python/glide/async_commands/server_modules/json.py index 4149ce0127..aadc0a7ae0 100644 --- a/python/python/glide/async_commands/server_modules/json.py +++ b/python/python/glide/async_commands/server_modules/json.py @@ -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`. @@ -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,