99from typing import Any , Callable , List , Mapping , Sequence , Tuple , Union
1010
1111from .box import BaseTextBox
12- from .utils import (CursesTextAttrConstant , CursesTextAttrConstants ,
12+ from .utils import (CursesTextAttribute , CursesTextAttributes ,
1313 CursesWindow , TextAttr , chunked )
1414
1515
@@ -43,8 +43,8 @@ def __init__(
4343 width : int ,
4444 title : str = "" ,
4545 title_colors_pair_nb : int = 0 ,
46- title_text_attr : Union [CursesTextAttrConstant ,
47- CursesTextAttrConstants ] = curses .A_BOLD ,
46+ title_text_attr : Union [CursesTextAttribute ,
47+ CursesTextAttributes ] = curses .A_BOLD ,
4848 downtime_chars : Sequence [str ] = ("," , "." , ":" , ";" , "!" , "?" ),
4949 downtime_chars_delay : int = 60 ,
5050 end_indicator : str = "►" ):
@@ -74,8 +74,8 @@ def __exit__(self, type, value, traceback):
7474 def _display_end_indicator (
7575 self ,
7676 win : CursesWindow ,
77- text_attr : CursesTextAttrConstants = (curses .A_BOLD ,
78- curses .A_BLINK )):
77+ text_attr : CursesTextAttributes = (curses .A_BOLD ,
78+ curses .A_BLINK )):
7979 """Displays an end indicator in the lower right corner of
8080 textbox.
8181
@@ -120,7 +120,7 @@ def _write_word_char_by_char(self,
120120 callback (* cargs )
121121
122122 def _write_word (self ,
123- win ,
123+ win : CursesWindow ,
124124 pos_x : int ,
125125 pos_y : int ,
126126 word : str ,
@@ -142,14 +142,14 @@ def _write_word(self,
142142
143143 def _one_by_one (self ,
144144 write_method : Callable ,
145- win ,
145+ win : CursesWindow ,
146146 text : str ,
147147 colors_pair_nb : int ,
148- text_attr : Union [CursesTextAttrConstant ,
149- CursesTextAttrConstants ],
148+ text_attr : Union [CursesTextAttribute ,
149+ CursesTextAttributes ],
150150 words_attr : Mapping [Sequence [str ],
151- Union [CursesTextAttrConstant ,
152- CursesTextAttrConstants ]],
151+ Union [CursesTextAttribute ,
152+ CursesTextAttributes ]],
153153 word_delimiter : str ,
154154 flash_screen : bool ,
155155 delay : int ,
@@ -207,11 +207,11 @@ def char_by_char(
207207 win : CursesWindow ,
208208 text : str ,
209209 colors_pair_nb : int = 0 ,
210- text_attr : Union [CursesTextAttrConstant ,
211- CursesTextAttrConstants ] = (),
210+ text_attr : Union [CursesTextAttribute ,
211+ CursesTextAttributes ] = (),
212212 words_attr : Mapping [Sequence [str ],
213- Union [CursesTextAttrConstant ,
214- CursesTextAttrConstants ]] = {},
213+ Union [CursesTextAttribute ,
214+ CursesTextAttributes ]] = {},
215215 word_delimiter : str = " " ,
216216 flash_screen : bool = False ,
217217 delay : int = 40 ,
@@ -309,11 +309,11 @@ def word_by_word(
309309 win : CursesWindow ,
310310 text : str ,
311311 colors_pair_nb : int = 0 ,
312- text_attr : Union [CursesTextAttrConstant ,
313- CursesTextAttrConstants ] = (),
312+ text_attr : Union [CursesTextAttribute ,
313+ CursesTextAttributes ] = (),
314314 words_attr : Mapping [Sequence [str ],
315- Union [CursesTextAttrConstant ,
316- CursesTextAttrConstants ]] = {},
315+ Union [CursesTextAttribute ,
316+ CursesTextAttributes ]] = {},
317317 word_delimiter : str = " " ,
318318 flash_screen : bool = False ,
319319 delay : int = 150 ,
0 commit comments