Skip to content

Change 'zrange' args type hints - adding Optional type hint for args that can be None #3610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -1146,3 +1146,4 @@ incompatible in code using*SCAN commands loops such as
* Implemented STRLEN
* Implemented PERSIST
* Implemented SETRANGE
* Changed type annotation of the `num` parameter in `zrange` from `int` to `Optional[int]
2 changes: 1 addition & 1 deletion redis/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4458,7 +4458,7 @@ def zrange(
byscore: bool = False,
bylex: bool = False,
offset: int = None,
num: int = None,
num: Optional[int] = None,
) -> ResponseT:
"""
Return a range of values from sorted set ``name`` between
Expand Down
Loading