aiohttp_rpc.typedefs   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 18
dl 0
loc 27
rs 10
c 0
b 0
f 0
1
import typing
2
3
from aiohttp import client_ws, web_ws
4
5
6
if typing.TYPE_CHECKING:
7
    from . import protocol  # NOQA
8
9
JsonRpcIdType = typing.Union[int, str]
10
JSONEncoderType = typing.Callable[[typing.Any], str]
11
UnboundJSONEncoderType = typing.Callable[[typing.Any], str]
12
SingleRequestProcessorType = typing.Callable[['protocol.JsonRpcRequest'], typing.Awaitable['protocol.JsonRpcResponse']]
13
UnboundSingleRequestProcessorType = typing.Callable[
14
    [typing.Any, 'protocol.JsonRpcRequest'],
15
    typing.Awaitable['protocol.JsonRpcResponse'],
16
]
17
18
ClientMethodDescriptionType = typing.Union[str, typing.Sequence, 'protocol.JsonRpcRequest']
19
ClientMethodDescriptionsType = typing.Union[
20
    typing.Iterable[ClientMethodDescriptionType],
21
    'protocol.JsonRpcBatchRequest',
22
]
23
24
ServerMethodDescriptionType = typing.Union['protocol.BaseJsonRpcMethod', typing.Callable]
25
26
WSConnectType = typing.Union[client_ws.ClientWebSocketResponse, web_ws.WebSocketResponse]
27