Skip to content

Commit 7b3a0b2

Browse files
authored
Allow floats for Redis timeouts (#4952)
Since Redis 6.0, floats are allowed, see: https://redis.io/commands/brpop
1 parent b4e447d commit 7b3a0b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

third_party/2and3/redis/client.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ class Redis(Generic[_StrType]):
374374
def watch(self, *names): ...
375375
def unlink(self, *names: _Key) -> int: ...
376376
def unwatch(self): ...
377-
def blpop(self, keys: Union[_Value, Iterable[_Value]], timeout: int = ...) -> Optional[Tuple[_StrType, _StrType]]: ...
378-
def brpop(self, keys: Union[_Value, Iterable[_Value]], timeout: int = ...) -> Optional[Tuple[_StrType, _StrType]]: ...
377+
def blpop(self, keys: Union[_Value, Iterable[_Value]], timeout: float = ...) -> Optional[Tuple[_StrType, _StrType]]: ...
378+
def brpop(self, keys: Union[_Value, Iterable[_Value]], timeout: float = ...) -> Optional[Tuple[_StrType, _StrType]]: ...
379379
def brpoplpush(self, src, dst, timeout=...): ...
380380
def lindex(self, name: _Key, index: int) -> Optional[_StrType]: ...
381381
def linsert(

0 commit comments

Comments
 (0)