update init stubs for Redis and redis Connection (#4648)

This commit is contained in:
Christine
2020-10-15 12:09:02 -04:00
committed by GitHub
parent 7e378a7554
commit 9a8979ec51
2 changed files with 24 additions and 15 deletions

View File

@@ -67,7 +67,12 @@ class Redis(object):
ssl_certfile: Optional[Text] = ...,
ssl_cert_reqs: Optional[Union[str, int]] = ...,
ssl_ca_certs: Optional[Text] = ...,
ssl_check_hostname: bool = ...,
max_connections: Optional[int] = ...,
single_connection_client: bool = ...,
health_check_interval: float = ...,
client_name: Optional[Text] = ...,
username: Optional[Text] = ...,
) -> None: ...
def set_response_callback(self, command, callback): ...
def pipeline(self, transaction: bool = ..., shard_hint: Any = ...) -> Pipeline: ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Optional, Text
from typing import Any, Mapping, Optional, Text, Union
ssl_available: Any
hiredis_version: Any
@@ -70,20 +70,24 @@ class Connection:
decode_responses: Any
def __init__(
self,
host=...,
port=...,
db=...,
password=...,
socket_timeout=...,
socket_connect_timeout=...,
socket_keepalive=...,
socket_keepalive_options=...,
retry_on_timeout=...,
encoding=...,
encoding_errors=...,
decode_responses=...,
parser_class=...,
socket_read_size=...,
host: Text = ...,
port: int = ...,
db: int = ...,
password: Optional[Text] = ...,
socket_timeout: Optional[float] = ...,
socket_connect_timeout: Optional[float] = ...,
socket_keepalive: bool = ...,
socket_keepalive_options: Optional[Mapping[str, Union[int, str]]] = ...,
socket_type: int = ...,
retry_on_timeout: bool = ...,
encoding: Text = ...,
encoding_errors: Text = ...,
decode_responses: bool = ...,
parser_class: Optional[BaseParser] = ...,
socket_read_size: int = ...,
health_check_interval: int = ...,
client_name: Optional[Text] = ...,
username: Optional[Text] = ...,
) -> None: ...
def __del__(self): ...
def register_connect_callback(self, callback): ...