Total Complexity | 0 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | # -*- coding:utf-8 -*- |
||
2 | 1 | """ |
|
3 | Module for constants and types |
||
4 | """ |
||
5 | |||
6 | 1 | from typing import Union, List |
|
7 | |||
8 | 1 | from telebot.types import InlineKeyboardButton |
|
9 | |||
10 | 1 | InlineButtonData = Union[str, int, tuple, dict, InlineKeyboardButton] |
|
11 | 1 | button_text_types = (str, int) |
|
12 | 1 | ButtonText = Union[button_text_types] |
|
13 | 1 | callback_data_types = (str, int, type(None)) |
|
14 | 1 | CallbackDataMarker = Union[callback_data_types] |
|
15 | 1 | FlatSequence = List[InlineButtonData] |
|
16 | 1 | StructuredSequence = List[Union[FlatSequence, InlineButtonData]] |
|
17 | 1 | BlockItems = Union[StructuredSequence, InlineButtonData] |
|
18 | 1 | MAXIMUM_ITEMS_IN_KEYBOARD = 100 |
|
19 | 1 | MAXIMUM_ITEMS_IN_LINE = 8 |
|
20 | 1 | MINIMUM_ITEMS_IN_LINE = 1 |
|
21 | 1 | DEFAULT_ITEMS_IN_LINE = MINIMUM_ITEMS_IN_LINE |
|
22 | 1 | AUTO_ALIGNMENT_RANGE = range(3, 6) |
|
23 | MAXIMUM_CBD_LENGTH = 64 |
||
24 |