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

Python: Fix xclaim documentation #2075

Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
#### Fixes
* Java: Add overloads for XADD to allow duplicate entry keys ([#1970](https://github.com/valkey-io/valkey-glide/pull/1970))
* Node: Fix ZADD bug where command could not be called with only the `changed` optional parameter ([#1995](https://github.com/valkey-io/valkey-glide/pull/1995))
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920))
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920))
* Python: Fix `XClaim` return type to `List[bytes]` instead of `List[TEncodable]` ([#2075](https://github.com/valkey-io/valkey-glide/pull/2075))
Yury-Fridlyand marked this conversation as resolved.
Show resolved Hide resolved

## 1.0.0 (2024-07-09)

Expand Down
10 changes: 5 additions & 5 deletions python/python/glide/async_commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3234,7 +3234,7 @@ async def xclaim(
options (Optional[StreamClaimOptions]): Stream claim options.

Returns:
A Mapping of message entries with the format
Mapping[bytes, List[List[bytes]]]: A Mapping of message entries with the format
{"entryId": [["entry", "data"], ...], ...} that are claimed by the consumer.

Examples:
Expand Down Expand Up @@ -3268,7 +3268,7 @@ async def xclaim_just_id(
min_idle_time_ms: int,
ids: List[TEncodable],
options: Optional[StreamClaimOptions] = None,
) -> List[TEncodable]:
) -> List[bytes]:
"""
Changes the ownership of a pending message. This function returns a List with
only the message/entry IDs, and is equivalent to using JUSTID in the Valkey API.
Expand All @@ -3284,7 +3284,7 @@ async def xclaim_just_id(
options (Optional[StreamClaimOptions]): Stream claim options.

Returns:
A List of message ids claimed by the consumer.
List[bytes]: A List of message ids claimed by the consumer.

Examples:
# read messages from streamId for consumer1
Expand All @@ -3296,7 +3296,7 @@ async def xclaim_just_id(
}
# "1-0" is now read, and we can assign the pending messages to consumer2
>>> await client.xclaim_just_id("mystream", "mygroup", "consumer2", 0, ["1-0"])
["1-0"]
[b"1-0"]
"""

args = [
Expand All @@ -3312,7 +3312,7 @@ async def xclaim_just_id(
args.extend(options.to_args())

return cast(
List[TEncodable],
List[bytes],
await self._execute_command(RequestType.XClaim, args),
)

Expand Down
Loading