add a couple missing stubs and fix an incorrect return type for redis stubs (#3545)

This commit is contained in:
Brian Maissy
2019-12-18 08:49:19 +02:00
committed by Sebastian Rittau
parent 4ed19cdaf5
commit c0c780a758

View File

@@ -80,6 +80,8 @@ class Redis(object):
def client_list(self): ...
def client_getname(self): ...
def client_setname(self, name): ...
def readwrite(self) -> bool: ...
def readonly(self) -> bool: ...
def config_get(self, pattern=...): ...
def config_set(self, name, value): ...
def config_resetstat(self): ...
@@ -121,7 +123,7 @@ class Redis(object):
__contains__: Any
def expire(self, name: Union[Text, bytes], time: Union[int, timedelta]) -> bool: ...
def expireat(self, name, when): ...
def get(self, name: Union[Text, bytes]) -> Optional[bytes]: ...
def get(self, name: Union[Text, bytes]) -> Any: ... # Optional[Union[str, bytes]] depending on decode_responses
def __getitem__(self, name): ...
def getbit(self, name, offset): ...
def getrange(self, key, start, end): ...
@@ -281,6 +283,7 @@ class Redis(object):
def pubsub_numsub(self, *args: Text) -> List[Tuple[Text, int]]: ...
def pubsub_numpat(self) -> int: ...
def monitor(self) -> Monitor: ...
def cluster(self, cluster_arg: str, *args: Any) -> Any: ...
StrictRedis = Redis