From 7b3a0b22786f00430725b1045d3e852e2c9dcae5 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Tue, 19 Jan 2021 16:01:39 +0100 Subject: [PATCH] Allow floats for Redis timeouts (#4952) Since Redis 6.0, floats are allowed, see: https://redis.io/commands/brpop --- third_party/2and3/redis/client.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/2and3/redis/client.pyi b/third_party/2and3/redis/client.pyi index 39599a948..8dd136fa0 100644 --- a/third_party/2and3/redis/client.pyi +++ b/third_party/2and3/redis/client.pyi @@ -374,8 +374,8 @@ class Redis(Generic[_StrType]): def watch(self, *names): ... def unlink(self, *names: _Key) -> int: ... def unwatch(self): ... - def blpop(self, keys: Union[_Value, Iterable[_Value]], timeout: int = ...) -> Optional[Tuple[_StrType, _StrType]]: ... - def brpop(self, keys: Union[_Value, Iterable[_Value]], timeout: int = ...) -> Optional[Tuple[_StrType, _StrType]]: ... + def blpop(self, keys: Union[_Value, Iterable[_Value]], timeout: float = ...) -> Optional[Tuple[_StrType, _StrType]]: ... + def brpop(self, keys: Union[_Value, Iterable[_Value]], timeout: float = ...) -> Optional[Tuple[_StrType, _StrType]]: ... def brpoplpush(self, src, dst, timeout=...): ... def lindex(self, name: _Key, index: int) -> Optional[_StrType]: ... def linsert(