Passed
Push — master ( 879c1c...3da0e6 )
by torrua
01:45
created

keyboa.constants   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 24
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0
wmc 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