Skip to content

Commit

Permalink
Fix objlen type hint (#2966)
Browse files Browse the repository at this point in the history
* Fix objlen type hint

* Update redis/commands/json/commands.py

Co-authored-by: dvora-h <[email protected]>

* linters

---------

Co-authored-by: dvora-h <[email protected]>
  • Loading branch information
2 people authored and vladvildanov committed Sep 27, 2024
1 parent 947efb6 commit eb3371e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion redis/commands/json/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down

0 comments on commit eb3371e

Please sign in to comment.