-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtyping.py
More file actions
39 lines (29 loc) · 976 Bytes
/
typing.py
File metadata and controls
39 lines (29 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from __future__ import annotations
from typing import *
from typing_extensions import *
PAD_INDEX = Union[
Tuple[Union[int, None], Union[int, None], int],
Tuple[Union[int, None], Union[int, None]],
Tuple[Union[int, None]],
int,
]
"""Filter pad index.
- 3-element tuple = (chain, filter, pad)]
- 2-element tuple = (filter, pad)
- 1-element tuple = (pad,)
- int = pad
A None item indicates not specified and
usually means to assign first available
"""
PAD_PAIR = Union[
Tuple[PAD_INDEX, PAD_INDEX],
Tuple[Union[PAD_INDEX, List[PAD_INDEX]], None],
Tuple[None, PAD_INDEX],
]
"""Specifies a filter pad linkage or labeling
A tuple pair of input pad and output pad.
- Set input or output pad is ``None`` to define a pad label
- If input label is an input stream specifier (e.g., 0:v or 1:a:0) and connects
to multiple filter inputs, specify with a list the input pad indices.
"""
JOIN_HOW = Literal["chainable", "per_chain", "all", "auto"]