|
22 | 22 | __all__ = ["DialogBox"] |
23 | 23 |
|
24 | 24 | import curses |
| 25 | +from numbers import Number |
25 | 26 | import random |
26 | 27 | import textwrap |
27 | 28 | import time |
|
31 | 32 | from .utils import (CursesTextAttributesConstant, |
32 | 33 | CursesTextAttributesConstants, |
33 | 34 | CursesWindow, |
34 | | - Numeric, |
35 | 35 | TextAttributes, |
36 | 36 | _make_chunk) |
37 | 37 |
|
@@ -71,7 +71,7 @@ def __init__( |
71 | 71 | CursesTextAttributesConstants] = curses.A_BOLD, |
72 | 72 | downtime_chars: Union[Tuple[str], |
73 | 73 | List[str]] = (",", ".", ":", ";", "!", "?"), |
74 | | - downtime_chars_delay: Numeric = .6, |
| 74 | + downtime_chars_delay: Number = .6, |
75 | 75 | end_indicator: str = "►"): |
76 | 76 | BaseTextBox.__init__(self, |
77 | 77 | pos_x, pos_y, |
@@ -127,8 +127,8 @@ def char_by_char( |
127 | 127 | words_attr: Union[Dict[Tuple[str], CursesTextAttributesConstant], |
128 | 128 | Dict[Tuple[str], CursesTextAttributesConstants]] = {}, |
129 | 129 | flash_screen: bool = False, |
130 | | - delay: Numeric = .04, |
131 | | - random_delay: Union[Tuple[Numeric], List[Numeric]] = (0, 0), |
| 130 | + delay: Number = .04, |
| 131 | + random_delay: Union[Tuple[Number], List[Number]] = (0, 0), |
132 | 132 | callback: Callable = lambda: None, |
133 | 133 | cargs: Union[Tuple, List] = ()): |
134 | 134 | """Writes the given text character by character in the current |
@@ -266,8 +266,8 @@ def word_by_word( |
266 | 266 | words_attr: Union[Dict[Tuple[str], CursesTextAttributesConstant], |
267 | 267 | Dict[Tuple[str], CursesTextAttributesConstants]] = {}, |
268 | 268 | flash_screen: bool = False, |
269 | | - delay: Numeric = .15, |
270 | | - random_delay: Union[Tuple[Numeric], List[Numeric]] = (0, 0), |
| 269 | + delay: Number = .15, |
| 270 | + random_delay: Union[Tuple[Number], List[Number]] = (0, 0), |
271 | 271 | callback: Callable = lambda: None, |
272 | 272 | cargs: Union[Tuple, List] = ()): |
273 | 273 | """Writes the given text word by word at position in the current |
|
0 commit comments