diff --git a/stubs/redis/redis/client.pyi b/stubs/redis/redis/client.pyi index 7c58ed786..33fe9fdcd 100644 --- a/stubs/redis/redis/client.pyi +++ b/stubs/redis/redis/client.pyi @@ -473,8 +473,14 @@ 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: float = ...) -> Optional[Tuple[_StrType, _StrType]]: ... - def brpop(self, keys: Union[_Value, Iterable[_Value]], timeout: float = ...) -> Optional[Tuple[_StrType, _StrType]]: ... + @overload + def blpop(self, keys: Union[_Value, Iterable[_Value]], timeout: Literal[0] = ...) -> Tuple[_StrType, _StrType]: ... + @overload + def blpop(self, keys: Union[_Value, Iterable[_Value]], timeout: float) -> Optional[Tuple[_StrType, _StrType]]: ... + @overload + def brpop(self, keys: Union[_Value, Iterable[_Value]], timeout: Literal[0] = ...) -> Tuple[_StrType, _StrType]: ... + @overload + 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(