Skip to content

Commit

Permalink
Python: Fix xclaim documentation (valkey-io#2075)
Browse files Browse the repository at this point in the history
* Python: Fix xclaim documentation

Signed-off-by: Andrew Carbonetto <[email protected]>
  • Loading branch information
acarbonetto authored and GumpacG committed Aug 7, 2024
1 parent 1e5ed6e commit db29b8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
#### Fixes
* Java: Add overloads for XADD to allow duplicate entry keys ([#1970](https:/valkey-io/valkey-glide/pull/1970))
* Node: Fix ZADD bug where command could not be called with only the `changed` optional parameter ([#1995](https:/valkey-io/valkey-glide/pull/1995))
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https:/valkey-io/valkey-glide/pull/1920))
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https:/valkey-io/valkey-glide/pull/1920))
* Python: Fix `XClaim` return type to `List[bytes]` instead of `List[TEncodable]` ([#2075](https:/valkey-io/valkey-glide/pull/2075))

## 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

0 comments on commit db29b8d

Please sign in to comment.