From a32b51379955ce8bdc141fcfc1a2cd091422e6f7 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 a16f07c150..0e46e40f47 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)) - 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``.