mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
add a couple missing stubs and fix an incorrect return type for redis stubs (#3545)
This commit is contained in:
committed by
Sebastian Rittau
parent
4ed19cdaf5
commit
c0c780a758
5
third_party/2and3/redis/client.pyi
vendored
5
third_party/2and3/redis/client.pyi
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user