client.pyi 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from typing import TypeVar, Any, Literal, overload
  2. from redis import Redis
  3. T = TypeVar("T", str, bytes)
  4. class RedisCluster(Redis[T]):
  5. @overload
  6. def __init__(
  7. self: RedisCluster[str],
  8. *,
  9. startup_nodes: list[dict[str, Any]],
  10. decode_responses: Literal[True],
  11. skip_full_coverage_check: bool,
  12. max_connections: int,
  13. max_connections_per_node: bool,
  14. readonly_mode: bool,
  15. **client_args: object,
  16. ) -> None: ...
  17. @overload
  18. def __init__(
  19. self: RedisCluster[bytes],
  20. *,
  21. startup_nodes: list[dict[str, Any]],
  22. decode_responses: Literal[False],
  23. skip_full_coverage_check: bool,
  24. max_connections: int,
  25. max_connections_per_node: bool,
  26. readonly_mode: bool,
  27. **client_args: object,
  28. ) -> None: ...
  29. @overload
  30. def __init__(
  31. self,
  32. *,
  33. startup_nodes: list[dict[str, Any]],
  34. decode_responses: bool,
  35. skip_full_coverage_check: bool,
  36. max_connections: int,
  37. max_connections_per_node: bool,
  38. readonly_mode: bool,
  39. **client_args: object,
  40. ) -> None: ...