mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
@@ -1,4 +1,4 @@
|
||||
version = "4.5.5"
|
||||
version = "4.6.0"
|
||||
# Requires a version of cryptography with a `py.typed` file
|
||||
requires = ["cryptography>=35.0.0", "types-pyOpenSSL"]
|
||||
partial_stub = true
|
||||
|
||||
@@ -827,7 +827,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
|
||||
withscores: bool = False,
|
||||
score_cast_func: Callable[[_StrType], Any] = ...,
|
||||
) -> Any: ...
|
||||
def zrank(self, name: _Key, value: _Value) -> Any: ... # type: ignore[override]
|
||||
def zrank(self, name: _Key, value: _Value, withscore: bool = False) -> Any: ... # type: ignore[override]
|
||||
def zrem(self, name: _Key, *values: _Value) -> Any: ... # type: ignore[override]
|
||||
def zremrangebylex(self, name: _Key, min: _Value, max: _Value) -> Any: ... # type: ignore[override]
|
||||
def zremrangebyrank(self, name: _Key, min: int, max: int) -> Any: ... # type: ignore[override]
|
||||
|
||||
@@ -42,7 +42,6 @@ ExceptionMappingT: TypeAlias = Mapping[str, type[Exception] | Mapping[str, type[
|
||||
class BaseParser:
|
||||
EXCEPTION_CLASSES: ExceptionMappingT
|
||||
def __init__(self, socket_read_size: int) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
@classmethod
|
||||
def parse_error(cls, response: str) -> ResponseError: ...
|
||||
def on_disconnect(self) -> None: ...
|
||||
@@ -81,8 +80,8 @@ class Connection:
|
||||
username: Any
|
||||
client_name: Any
|
||||
password: Any
|
||||
socket_timeout: Any
|
||||
socket_connect_timeout: Any
|
||||
socket_timeout: float | None
|
||||
socket_connect_timeout: float | None
|
||||
socket_keepalive: Any
|
||||
socket_keepalive_options: Any
|
||||
socket_type: Any
|
||||
@@ -122,7 +121,6 @@ class Connection:
|
||||
credential_provider: CredentialProvider | None = None,
|
||||
) -> None: ...
|
||||
def repr_pieces(self): ...
|
||||
def __del__(self) -> None: ...
|
||||
@property
|
||||
def is_connected(self): ...
|
||||
def register_connect_callback(self, callback) -> None: ...
|
||||
@@ -196,8 +194,6 @@ class UnixDomainSocketConnection(Connection):
|
||||
username: Any
|
||||
client_name: Any
|
||||
password: Any
|
||||
socket_timeout: Any
|
||||
socket_connect_timeout: Any
|
||||
retry_on_timeout: Any
|
||||
retry_on_error: list[type[RedisError]]
|
||||
retry: Any
|
||||
|
||||
@@ -17,11 +17,13 @@ class SentinelManagedConnection(Connection):
|
||||
async def connect_to(self, address) -> None: ...
|
||||
async def connect(self): ...
|
||||
@overload # type: ignore[override]
|
||||
async def read_response(self, *, timeout: float) -> Incomplete | None: ...
|
||||
async def read_response(self, *, timeout: float, disconnect_on_error: bool = True) -> Incomplete | None: ...
|
||||
@overload
|
||||
async def read_response(self, disable_decoding: bool, timeout: float) -> Incomplete | None: ...
|
||||
async def read_response(
|
||||
self, disable_decoding: bool, timeout: float, *, disconnect_on_error: bool = True
|
||||
) -> Incomplete | None: ...
|
||||
@overload
|
||||
async def read_response(self, disable_decoding: bool = False, timeout: None = None): ...
|
||||
async def read_response(self, disable_decoding: bool = False, timeout: None = None, *, disconnect_on_error: bool = True): ...
|
||||
|
||||
class SentinelManagedSSLConnection(SentinelManagedConnection, SSLConnection): ...
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
|
||||
withscores: bool = False,
|
||||
score_cast_func: Callable[[_StrType], Any] = ...,
|
||||
) -> Pipeline[_StrType]: ...
|
||||
def zrank(self, name: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def zrank(self, name: _Key, value: _Value, withscore: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def zrem(self, name: _Key, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def zremrangebylex(self, name: _Key, min: _Value, max: _Value) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def zremrangebyrank(self, name: _Key, min: _Value, max: _Value) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
|
||||
@@ -1178,7 +1178,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
withscores: bool = False,
|
||||
score_cast_func: Callable[[_StrType], Any] = ...,
|
||||
) -> list[_StrType]: ...
|
||||
def zrank(self, name: _Key, value: _Value) -> int | None: ...
|
||||
def zrank(self, name: _Key, value: _Value, withscore: bool = False) -> int | None: ...
|
||||
def zrem(self, name: _Key, *values: _Value) -> int: ...
|
||||
def zremrangebylex(self, name: _Key, min: _Value, max: _Value) -> int: ...
|
||||
def zremrangebyrank(self, name: _Key, min: int, max: int) -> int: ...
|
||||
@@ -1381,7 +1381,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
withscores: bool = False,
|
||||
score_cast_func: Callable[[_StrType], Any] = ...,
|
||||
) -> list[_StrType]: ...
|
||||
async def zrank(self, name: _Key, value: _Value) -> int | None: ...
|
||||
async def zrank(self, name: _Key, value: _Value, withscore: bool = False) -> int | None: ...
|
||||
async def zrem(self, name: _Key, *values: _Value) -> int: ...
|
||||
async def zremrangebylex(self, name: _Key, min: _Value, max: _Value) -> int: ...
|
||||
async def zremrangebyrank(self, name: _Key, min: int, max: int) -> int: ...
|
||||
|
||||
@@ -89,6 +89,8 @@ class AbstractConnection:
|
||||
credential_provider: CredentialProvider | None
|
||||
password: str | None
|
||||
username: str | None
|
||||
socket_timeout: float | None
|
||||
socket_connect_timeout: float | None
|
||||
retry_on_timeout: bool
|
||||
retry_on_error: list[type[Exception]]
|
||||
retry: Retry
|
||||
@@ -101,6 +103,8 @@ class AbstractConnection:
|
||||
self,
|
||||
db: int = 0,
|
||||
password: str | None = None,
|
||||
socket_timeout: float | None = None,
|
||||
socket_connect_timeout: float | None = None,
|
||||
retry_on_timeout: bool = False,
|
||||
retry_on_error: list[type[Exception]] = ...,
|
||||
encoding: str = "utf-8",
|
||||
@@ -137,8 +141,6 @@ class AbstractConnection:
|
||||
class Connection(AbstractConnection):
|
||||
host: str
|
||||
port: int
|
||||
socket_timeout: float | None
|
||||
socket_connect_timeout: float | None
|
||||
socket_keepalive: bool
|
||||
socket_keepalive_options: Mapping[str, int | str]
|
||||
socket_type: int
|
||||
@@ -146,14 +148,14 @@ class Connection(AbstractConnection):
|
||||
self,
|
||||
host: str = "localhost",
|
||||
port: int = 6379,
|
||||
socket_timeout: float | None = None,
|
||||
socket_connect_timeout: float | None = None,
|
||||
socket_keepalive: bool = False,
|
||||
socket_keepalive_options: Mapping[str, int | str] | None = None,
|
||||
socket_type: int = 0,
|
||||
*,
|
||||
db: int = 0,
|
||||
password: str | None = None,
|
||||
socket_timeout: float | None = None,
|
||||
socket_connect_timeout: float | None = None,
|
||||
retry_on_timeout: bool = False,
|
||||
retry_on_error: list[type[Exception]] = ...,
|
||||
encoding: str = "utf-8",
|
||||
@@ -225,14 +227,14 @@ class SSLConnection(Connection):
|
||||
|
||||
class UnixDomainSocketConnection(AbstractConnection):
|
||||
path: str
|
||||
socket_timeout: float | None
|
||||
def __init__(
|
||||
self,
|
||||
path: str = "",
|
||||
socket_timeout: float | None = None,
|
||||
*,
|
||||
db: int = 0,
|
||||
password: str | None = None,
|
||||
socket_timeout: float | None = None,
|
||||
socket_connect_timeout: float | None = None,
|
||||
retry_on_timeout: bool = False,
|
||||
retry_on_error: list[type[Exception]] = ...,
|
||||
encoding: str = "utf-8",
|
||||
|
||||
@@ -16,11 +16,11 @@ class SlaveNotFoundError(ConnectionError): ...
|
||||
|
||||
class SentinelManagedConnection(Connection):
|
||||
connection_pool: SentinelConnectionPool
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
def __init__(self, *, connection_pool: SentinelConnectionPool, **kwargs) -> None: ...
|
||||
def connect_to(self, address: _AddressAndPort) -> None: ...
|
||||
def connect(self) -> None: ...
|
||||
# The result can be either `str | bytes` or `list[str | bytes]`
|
||||
def read_response(self, disable_decoding: bool = False) -> Any: ... # type: ignore[override]
|
||||
def read_response(self, disable_decoding: bool = False, *, disconnect_on_error: bool = False) -> Any: ...
|
||||
|
||||
class SentinelManagedSSLConnection(SentinelManagedConnection, SSLConnection): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user