Skip to content
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

update the return type of scan family #135

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions valkey/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2987,7 +2987,7 @@ def scan(
count: Union[int, None] = None,
_type: Union[str, None] = None,
**kwargs,
) -> ResponseT:
) -> Tuple[int, List[bytes]]:
"""
Incrementally return lists of key names. Also return a cursor
indicating the scan position.
Expand Down Expand Up @@ -3047,7 +3047,7 @@ def sscan(
cursor: int = 0,
match: Union[PatternT, None] = None,
count: Union[int, None] = None,
) -> ResponseT:
) -> Tuple[int, List[bytes]]:
"""
Incrementally return lists of elements in a set. Also return a cursor
indicating the scan position.
Expand Down Expand Up @@ -3091,7 +3091,7 @@ def hscan(
match: Union[PatternT, None] = None,
count: Union[int, None] = None,
no_values: Union[bool, None] = None,
) -> ResponseT:
) -> Tuple[int, Dict[bytes, bytes]]:
"""
Incrementally return key/value slices in a hash. Also return a cursor
indicating the scan position.
Expand Down Expand Up @@ -3147,7 +3147,7 @@ def zscan(
match: Union[PatternT, None] = None,
count: Union[int, None] = None,
score_cast_func: Union[type, Callable] = float,
) -> ResponseT:
) -> Tuple[int, List[Tuple[bytes, float]]]:
"""
Incrementally return lists of elements in a sorted set. Also return a
cursor indicating the scan position.
Expand Down
Loading