main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -7,18 +7,21 @@ from typing import (
Awaitable,
Iterable,
Mapping,
Protocol,
Type,
TypeVar,
Union,
)
from redis.compat import Protocol
if TYPE_CHECKING:
from redis._parsers import Encoder
from redis.asyncio.connection import ConnectionPool as AsyncConnectionPool
from redis.connection import ConnectionPool
Number = Union[int, float]
EncodedT = Union[bytes, bytearray, memoryview]
EncodedT = Union[bytes, memoryview]
DecodedT = Union[str, int, float]
EncodableT = Union[EncodedT, DecodedT]
AbsExpiryT = Union[int, datetime]
@@ -30,7 +33,6 @@ KeyT = _StringLikeT # Main redis key space
PatternT = _StringLikeT # Patterns matched against keys, fields etc
FieldT = EncodableT # Fields within hash tables, streams and geo commands
KeysT = Union[KeyT, Iterable[KeyT]]
ResponseT = Union[Awaitable[Any], Any]
ChannelT = _StringLikeT
GroupT = _StringLikeT # Consumer group
ConsumerT = _StringLikeT # Consumer name
@@ -50,8 +52,14 @@ ExceptionMappingT = Mapping[str, Union[Type[Exception], Mapping[str, Type[Except
class CommandsProtocol(Protocol):
def execute_command(self, *args, **options) -> ResponseT: ...
connection_pool: Union["AsyncConnectionPool", "ConnectionPool"]
def execute_command(self, *args, **options):
...
class ClusterCommandsProtocol(CommandsProtocol):
class ClusterCommandsProtocol(CommandsProtocol, Protocol):
encoder: "Encoder"
def execute_command(self, *args, **options) -> Union[Any, Awaitable]:
...