n0ob404
2a9f081abb
Add annotations for some redis client methods ( #5559 )
...
Add annotation for move(), persist(), pexpire(), and expireat().
2021-05-31 22:01:11 +02:00
Rich Li
901dd52ec5
Add more redis stubs for sets ( #5490 )
2021-05-18 08:39:03 +02:00
n0ob404
7a9b4f93ba
Add stubs for redis Redis and Pipeline methods ( #5415 )
2021-05-13 09:53:26 +02:00
Ricardo
e3f510e896
redis client: adding __del__ and close ( #5365 )
...
* redis client: adding __del__ and close
2021-05-07 16:48:55 +03:00
Sebastian Rittau
4ac3ccad45
black: enable skip_magic_trailing_comma ( #5252 )
...
* black: enable skip_magic_trailing_comma
* Remove spurious commas
2021-04-27 08:32:32 -07:00
Christopher Dignam
0f8f428e23
[redis] add type for Client.lock ( #5176 )
2021-04-27 08:32:15 +02:00
Sebastian Rittau
45916045c8
Upgrade black to 21.4b0 and reformat ( #5250 )
...
This introduces newlines before decorators.
2021-04-26 13:58:27 +02:00
dearoneesama
8eaffee63a
Fix redis pipe.hset() signature ( #5196 )
2021-04-08 19:03:51 -07:00
dearoneesama
5a3b6c72a7
Fix redis stub hset() to allow only providing mapping ( #5168 )
...
* Fix redis stub hset() to allow only providing mapping
* Fix redis stub hset() and hmset() mapping type
2021-04-04 11:40:29 +03:00
Christopher Dignam
87bcb37d3f
[redis] add more exceptions ( #5174 )
...
* [redis] add more exceptions
2021-04-02 22:06:03 +03:00
Árni Már Jónsson
82cd7d22c6
add stubs for redis.lock ( #5105 )
2021-03-22 19:08:12 -07:00
Guilhem C
6170697b25
redis: add redis.client.Client method stubs ( #5110 )
...
* redis: add setnx function stubs (redis.client.Client.setnx)
* redis: add incr function stubs (redis.client.Client.incr)
2021-03-22 18:53:59 -07:00
Christopher Dignam
10da20293e
[redis] add remaining sorted set types ( #5097 )
2021-03-08 14:59:47 +01:00
Guilhem C
bf583da275
redis: complete redis.utils stubs ( #5067 )
2021-02-25 12:46:12 +01:00
Christopher Dignam
46ac6bf87f
[redis] fix pipeline return types ( #4989 )
...
Pipeline is a subclass of Redis, but instead of the commands returning results, they return Pipeline.
2021-02-23 08:28:01 +01:00
Guilhem C
ad2624551b
redis: complete echo command stub (redis.client.Redis.echo) ( #5033 )
2021-02-22 13:18:45 +01:00
Christopher Dignam
93e2806232
[redis] add overload for blpop and brpop timeout ( #4998 )
...
0 is the default value for the timeout argument for both blpop and brpop. When the timeout is `0`, the return type is non-nullable. Otherwise the return type is optional.
I tested my change with the following code
```python
from typing import Optional, Tuple
import redis
def test_blpop_timeout(r: redis.Redis) -> None:
a: Tuple[bytes, bytes] = r.blpop('')
b: Tuple[bytes, bytes] = r.blpop('',timeout=0)
c: Optional[Tuple[bytes, bytes]] = r.blpop('', timeout=1)
d: Optional[Tuple[bytes, bytes]] = r.blpop('', timeout=1.0)
def test_brpop_timeout(r: redis.Redis) -> None:
a: Tuple[bytes, bytes] = r.brpop('')
b: Tuple[bytes, bytes] = r.brpop('',timeout=0)
c: Optional[Tuple[bytes, bytes]] = r.brpop('', timeout=1)
d: Optional[Tuple[bytes, bytes]] = r.brpop('', timeout=1.0)
```
2021-02-04 20:32:34 -08:00
Ivan Levkivskyi
16ae4c6120
Re-organize directory structure ( #4971 )
...
See discussion in #2491
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-01-27 12:00:39 +00:00