Skip to content

Commit 15db0e8

Browse files
authored
Python: minor corrections in BITFIELD and BITFIELD_RO docs (#2048)
Signed-off-by: aaron-congo <aaron.congo@improving.com>
1 parent 3821630 commit 15db0e8

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#### Changes
22
* Node: Exported client configuration types ([#2023](https://github.com/valkey-io/valkey-glide/pull/2023))
33
* Java, Python: Update docs for GEOSEARCH command ([#2017](https://github.com/valkey-io/valkey-glide/pull/2017))
4+
* Python: Update docs for BITFIELD and BITFIELD_RO commands ([#2048](https://github.com/valkey-io/valkey-glide/pull/2048))
45
* Node: Added FUNCTION LIST command ([#2019](https://github.com/valkey-io/valkey-glide/pull/2019))
56
* Node: Added GEOSEARCH command ([#2007](https://github.com/valkey-io/valkey-glide/pull/2007))
67
* Node: Added LMOVE command ([#2002](https://github.com/valkey-io/valkey-glide/pull/2002))

python/python/glide/async_commands/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5743,16 +5743,16 @@ async def bitfield(
57435743
57445744
Returns:
57455745
List[Optional[int]]: An array of results from the executed subcommands:
5746-
- `BitFieldGet` returns the value in `Offset` or `OffsetMultiplier`.
5747-
- `BitFieldSet` returns the old value in `Offset` or `OffsetMultiplier`.
5748-
- `BitFieldIncrBy` returns the new value in `Offset` or `OffsetMultiplier`.
5746+
- `BitFieldGet` returns the value in `BitOffset` or `BitOffsetMultiplier`.
5747+
- `BitFieldSet` returns the old value in `BitOffset` or `BitOffsetMultiplier`.
5748+
- `BitFieldIncrBy` returns the new value in `BitOffset` or `BitOffsetMultiplier`.
57495749
- `BitFieldOverflow` determines the behavior of the "SET" and "INCRBY" subcommands when an overflow or
57505750
underflow occurs. "OVERFLOW" does not return a value and does not contribute a value to the list
57515751
response.
57525752
57535753
Examples:
57545754
>>> await client.set("my_key", "A") # "A" has binary value 01000001
5755-
>>> await client.bitfield("my_key", [BitFieldSet(UnsignedEncoding(2), Offset(1), 3), BitFieldGet(UnsignedEncoding(2), Offset(1))])
5755+
>>> await client.bitfield("my_key", [BitFieldSet(UnsignedEncoding(2), BitOffset(1), 3), BitFieldGet(UnsignedEncoding(2), BitOffset(1))])
57565756
[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.
57575757
"""
57585758
args = [key] + _create_bitfield_args(subcommands)

python/python/glide/async_commands/transaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4196,9 +4196,9 @@ def bitfield(
41964196
41974197
Command response:
41984198
List[Optional[int]]: An array of results from the executed subcommands:
4199-
- `BitFieldGet` returns the value in `Offset` or `OffsetMultiplier`.
4200-
- `BitFieldSet` returns the old value in `Offset` or `OffsetMultiplier`.
4201-
- `BitFieldIncrBy` returns the new value in `Offset` or `OffsetMultiplier`.
4199+
- `BitFieldGet` returns the value in `BitOffset` or `BitOffsetMultiplier`.
4200+
- `BitFieldSet` returns the old value in `BitOffset` or `BitOffsetMultiplier`.
4201+
- `BitFieldIncrBy` returns the new value in `BitOffset` or `BitOffsetMultiplier`.
42024202
- `BitFieldOverflow` determines the behavior of the "SET" and "INCRBY" subcommands when an overflow or
42034203
underflow occurs. "OVERFLOW" does not return a value and does not contribute a value to the list
42044204
response.

0 commit comments

Comments
 (0)