redis: Improve kwargs typing in sentinel (#8661)

This commit is contained in:
Nikita Sobolev
2022-09-02 15:02:12 +03:00
committed by GitHub
parent 70d76ecf8f
commit 4a4acdb30a

View File

@@ -27,7 +27,6 @@ class SentinelManagedSSLConnection(SentinelManagedConnection, SSLConnection): ..
class SentinelConnectionPool(ConnectionPool):
is_master: bool
check_connection: bool
connection_kwargs: Any
service_name: str
sentinel_manager: Sentinel
def __init__(self, service_name: str, sentinel_manager: Sentinel, **kwargs) -> None: ...
@@ -37,15 +36,15 @@ class SentinelConnectionPool(ConnectionPool):
def rotate_slaves(self) -> Iterator[_AddressAndPort]: ...
class Sentinel(SentinelCommands):
sentinel_kwargs: Any
sentinel_kwargs: dict[str, Any]
sentinels: list[Redis[Any]]
min_other_sentinels: int
connection_kwargs: Any
connection_kwargs: dict[str, Any]
def __init__(
self,
sentinels: Iterable[_AddressAndPort],
min_other_sentinels: int = ...,
sentinel_kwargs: Any | None = ...,
sentinel_kwargs: dict[str, Any] | None = ...,
**connection_kwargs,
) -> None: ...
def check_master_state(self, state: _SentinelState, service_name: str) -> bool: ...