@@ -80,12 +80,13 @@ def char_by_char(self,
8080 CursesTextAttributes ] = (),
8181 words_attr : Mapping [Sequence [str ],
8282 Union [CursesTextAttribute ,
83- CursesTextAttributes ]] = {},
83+ CursesTextAttributes ]] = {},
8484 word_delimiter : str = " " ,
8585 flash_screen : bool = False ,
8686 delay : int = 40 ,
8787 random_delay : Sequence [int ] = (0 , 0 ),
88- callbacks : Iterable [Callable ] = ()):
88+ callbacks : Iterable [Callable [["DialogBox" , str ],
89+ Optional [Any ]]] = ()):
8990 """Write the given text character by character.
9091
9192 :param win: ``curses`` window object on which the method will
@@ -188,7 +189,8 @@ def word_by_word(self,
188189 flash_screen : bool = False ,
189190 delay : int = 150 ,
190191 random_delay : Sequence [int ] = (0 , 0 ),
191- callbacks : Iterable [Callable ] = ()):
192+ callbacks : Iterable [Callable [["DialogBox" , str ],
193+ Optional [Any ]]] = ()):
192194 """Write the given text word by word.
193195
194196 :param win: ``curses`` window object on which the method will
@@ -331,7 +333,8 @@ def _write_word(self,
331333 word : str ,
332334 delay : int ,
333335 random_delay : Sequence [int ],
334- callbacks : Iterable [Callable [[BaseTextBox , str ], Optional [Any ]]]):
336+ callbacks : Iterable [Callable [["DialogBox" , str ],
337+ Optional [Any ]]]):
335338 """Write word at given position."""
336339 win .addstr (pos_y ,
337340 pos_x ,
@@ -359,7 +362,8 @@ def _one_by_one(self,
359362 flash_screen : bool ,
360363 delay : int ,
361364 random_delay : Sequence [int ],
362- callbacks : Iterable [Callable ]):
365+ callbacks : Iterable [Callable [["DialogBox" , str ],
366+ Optional [Any ]]]]):
363367 """This method offers a general purpose API to display text
364368 regardless of whether it is written word by word or character by
365369 character.
0 commit comments