Add more stubs to redis (pubsub and monitor) (#3442)

This commit is contained in:
Markus Bauer
2019-11-06 12:05:51 +01:00
committed by Sebastian Rittau
parent 99a6fb3108
commit f39c102eb8

View File

@@ -277,6 +277,10 @@ class Redis(object):
def script_kill(self): ...
def script_load(self, script): ...
def register_script(self, script): ...
def pubsub_channels(self, pattern: Text = ...) -> List[Text]: ...
def pubsub_numsub(self, *args: Text) -> List[Tuple[Text, int]]: ...
def pubsub_numpat(self) -> int: ...
def monitor(self) -> Monitor: ...
StrictRedis = Redis
@@ -350,3 +354,10 @@ class Script:
sha: Any
def __init__(self, registered_client, script) -> None: ...
def __call__(self, keys=..., args=..., client=...): ...
class Monitor(object):
def __init__(self, connection_pool) -> None: ...
def __enter__(self) -> Monitor: ...
def __exit__(self, *args: Any) -> None: ...
def next_command(self) -> Dict[Text, Any]: ...
def listen(self) -> Iterable[Dict[Text, Any]]: ...