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 <67596500+dvora-h@users.noreply.github.com>

* linters

---------

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
  • Loading branch information
trkwyk and dvora-h committed Feb 25, 2024
1 parent 33450d9 commit a32b513
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))

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 a32b513

Please sign in to comment.