From fabc23e0aaeef82ffd2da7037eeb707e567ce340 Mon Sep 17 00:00:00 2001 From: trkwyk <50520795+trkwyk@users.noreply.github.com> Date: Wed, 10 Jan 2024 02:49:30 +0800 Subject: [PATCH] Fix objlen type hint (#2966) * Fix objlen type hint * Update redis/commands/json/commands.py Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> * linters --------- Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> --- redis/commands/json/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py index 4c2e58369c..b37dc37687 100644 --- a/redis/commands/json/commands.py +++ b/redis/commands/json/commands.py @@ -121,7 +121,9 @@ def objkeys( """ # noqa return self.execute_command("JSON.OBJKEYS", name, str(path), keys=[name]) - def objlen(self, name: str, path: Optional[str] = Path.root_path()) -> int: + def objlen( + self, name: str, path: Optional[str] = Path.root_path() + ) -> List[Optional[int]]: """Return the length of the dictionary JSON value under ``path`` at key ``name``.