From 9a8979ec51346be90939f1c8d7a124c10997d0b5 Mon Sep 17 00:00:00 2001 From: Christine Date: Thu, 15 Oct 2020 12:09:02 -0400 Subject: [PATCH] update init stubs for Redis and redis Connection (#4648) --- third_party/2and3/redis/client.pyi | 5 ++++ third_party/2and3/redis/connection.pyi | 34 ++++++++++++++------------ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/third_party/2and3/redis/client.pyi b/third_party/2and3/redis/client.pyi index 503decea1..0b9b12fa6 100644 --- a/third_party/2and3/redis/client.pyi +++ b/third_party/2and3/redis/client.pyi @@ -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: ... diff --git a/third_party/2and3/redis/connection.pyi b/third_party/2and3/redis/connection.pyi index 04e5d647f..719e95b7e 100644 --- a/third_party/2and3/redis/connection.pyi +++ b/third_party/2and3/redis/connection.pyi @@ -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): ...