Skip to content

Commit

Permalink
Python: minor corrections in BITFIELD and BITFIELD_RO docs (valkey-io…
Browse files Browse the repository at this point in the history
…#2048)

Signed-off-by: aaron-congo <[email protected]>
  • Loading branch information
aaron-congo authored Jul 30, 2024
1 parent 3821630 commit 15db0e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#### Changes
* Node: Exported client configuration types ([#2023](https://github.com/valkey-io/valkey-glide/pull/2023))
* Java, Python: Update docs for GEOSEARCH command ([#2017](https://github.com/valkey-io/valkey-glide/pull/2017))
* Python: Update docs for BITFIELD and BITFIELD_RO commands ([#2048](https://github.com/valkey-io/valkey-glide/pull/2048))
* Node: Added FUNCTION LIST command ([#2019](https://github.com/valkey-io/valkey-glide/pull/2019))
* Node: Added GEOSEARCH command ([#2007](https://github.com/valkey-io/valkey-glide/pull/2007))
* Node: Added LMOVE command ([#2002](https://github.com/valkey-io/valkey-glide/pull/2002))
Expand Down
8 changes: 4 additions & 4 deletions python/python/glide/async_commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5743,16 +5743,16 @@ async def bitfield(
Returns:
List[Optional[int]]: An array of results from the executed subcommands:
- `BitFieldGet` returns the value in `Offset` or `OffsetMultiplier`.
- `BitFieldSet` returns the old value in `Offset` or `OffsetMultiplier`.
- `BitFieldIncrBy` returns the new value in `Offset` or `OffsetMultiplier`.
- `BitFieldGet` returns the value in `BitOffset` or `BitOffsetMultiplier`.
- `BitFieldSet` returns the old value in `BitOffset` or `BitOffsetMultiplier`.
- `BitFieldIncrBy` returns the new value in `BitOffset` or `BitOffsetMultiplier`.
- `BitFieldOverflow` determines the behavior of the "SET" and "INCRBY" subcommands when an overflow or
underflow occurs. "OVERFLOW" does not return a value and does not contribute a value to the list
response.
Examples:
>>> await client.set("my_key", "A") # "A" has binary value 01000001
>>> await client.bitfield("my_key", [BitFieldSet(UnsignedEncoding(2), Offset(1), 3), BitFieldGet(UnsignedEncoding(2), Offset(1))])
>>> await client.bitfield("my_key", [BitFieldSet(UnsignedEncoding(2), BitOffset(1), 3), BitFieldGet(UnsignedEncoding(2), BitOffset(1))])
[2, 3] # The old value at offset 1 with an unsigned encoding of 2 was 2. The new value at offset 1 with an unsigned encoding of 2 is 3.
"""
args = [key] + _create_bitfield_args(subcommands)
Expand Down
6 changes: 3 additions & 3 deletions python/python/glide/async_commands/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -4196,9 +4196,9 @@ def bitfield(
Command response:
List[Optional[int]]: An array of results from the executed subcommands:
- `BitFieldGet` returns the value in `Offset` or `OffsetMultiplier`.
- `BitFieldSet` returns the old value in `Offset` or `OffsetMultiplier`.
- `BitFieldIncrBy` returns the new value in `Offset` or `OffsetMultiplier`.
- `BitFieldGet` returns the value in `BitOffset` or `BitOffsetMultiplier`.
- `BitFieldSet` returns the old value in `BitOffset` or `BitOffsetMultiplier`.
- `BitFieldIncrBy` returns the new value in `BitOffset` or `BitOffsetMultiplier`.
- `BitFieldOverflow` determines the behavior of the "SET" and "INCRBY" subcommands when an overflow or
underflow occurs. "OVERFLOW" does not return a value and does not contribute a value to the list
response.
Expand Down

0 comments on commit 15db0e8

Please sign in to comment.