typing.py
Defines a Python execute_command helperPython asyncio library reference
SHA-256dc8f9b51354c09862c5bdd71a41465b70447fdbc3a71619c4fc388de21bdc297
MaleculeH(Po)
Evidence
1# from __future__ import annotations
2
3from datetime import datetime, timedelta
4from typing import (
5 TYPE_CHECKING,
6 Any,
7 Awaitable,
8 Iterable,
9 Mapping,
10 Protocol,
11 Type,
12 TypeVar,
13 Union,
14)
15
16if TYPE_CHECKING:
17 from redis._parsers import Encoder
18 from redis.asyncio.connection import ConnectionPool as AsyncConnectionPool
19 from redis.connection import ConnectionPool
20
21
22Number = Union[int, float]
23EncodedT = Union[bytes, memoryview]
24DecodedT = Union[str, int, flo …
27:32…
28ZScoreBoundT = Union[float, str] # str allows for the [ or ( prefix
29BitfieldOffsetT = Union[int, str] # str allows for #x syntax
30_StringLikeT = Unio …
33:11… ncodableT # Fields within hash tables, streams and geo commands
34KeysT = Union[KeyT, Iterable[KeyT]]
35ResponseT = Union[Awaitable, Any]
36ChannelT = _ …
43:80…
44# a TypeVar instead of a Union allows mappings with any of the permitted types
45# to be passed. Care is needed if there is more than one such mappin …
⋯9 lines
55 connection_pool: Union["AsyncConnectionPool", "ConnectionPool"]
56
57 def execute_command(self, *args, **options):
58 ...
59
⋯5 lines