Skip to content

Commit 0c8715b

Browse files
committed
adjusted comments to reflect proper error returns
1 parent e1306c0 commit 0c8715b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

redis/client.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ class Redis(threading.local):
207207
bool
208208
),
209209
string_keys_to_dict(
210-
'DECRBY HLEN INCRBY LINSERT LLEN LPUSHX RPUSHX SCARD SDIFFSTORE SINTERSTORE '
211-
'SUNIONSTORE ZCARD ZREMRANGEBYRANK ZREMRANGEBYSCORE ZREVRANK',
210+
'DECRBY HLEN INCRBY LINSERT LLEN LPUSHX RPUSHX SCARD SDIFFSTORE '
211+
'SINTERSTORE SUNIONSTORE ZCARD ZREMRANGEBYRANK ZREMRANGEBYSCORE '
212+
'ZREVRANK',
212213
int
213214
),
214215
string_keys_to_dict(
@@ -753,10 +754,11 @@ def lindex(self, name, index):
753754

754755
def linsert(self, name, where, refvalue, value):
755756
"""
756-
Insert ``value`` in list ``name`` either immediately before or after [``where``] ``refvalue``
757+
Insert ``value`` in list ``name`` either immediately before or after
758+
[``where``] ``refvalue``
757759
758-
Returns positive int length of the list on success, -1 if ``refvalue`` is not in the list,
759-
0 if ``name`` is not a list.
760+
Returns the new length of the list on success or -1 if ``refvalue``
761+
is not in the list.
760762
"""
761763
return self.execute_command('LINSERT', name, where, refvalue, value)
762764

0 commit comments

Comments
 (0)