66import curses
77import random
88import textwrap
9- from typing import Any , Callable , Dict , List , Sequence , Tuple , Union
9+ from typing import Any , Callable , List , Mapping , Sequence , Tuple , Union
1010
1111from .box import BaseTextBox
1212from .utils import (CursesTextAttrConstant , CursesTextAttrConstants ,
@@ -147,9 +147,9 @@ def _one_by_one(self,
147147 colors_pair_nb : int ,
148148 text_attr : Union [CursesTextAttrConstant ,
149149 CursesTextAttrConstants ],
150- words_attr : Dict [Sequence [str ],
151- Union [CursesTextAttrConstant ,
152- CursesTextAttrConstants ]],
150+ words_attr : Mapping [Sequence [str ],
151+ Union [CursesTextAttrConstant ,
152+ CursesTextAttrConstants ]],
153153 word_delimiter : str ,
154154 flash_screen : bool ,
155155 delay : int ,
@@ -209,9 +209,9 @@ def char_by_char(
209209 colors_pair_nb : int = 0 ,
210210 text_attr : Union [CursesTextAttrConstant ,
211211 CursesTextAttrConstants ] = (),
212- words_attr : Dict [Sequence [str ],
213- Union [CursesTextAttrConstant ,
214- CursesTextAttrConstants ]] = {},
212+ words_attr : Mapping [Sequence [str ],
213+ Union [CursesTextAttrConstant ,
214+ CursesTextAttrConstants ]] = {},
215215 word_delimiter : str = " " ,
216216 flash_screen : bool = False ,
217217 delay : int = 40 ,
@@ -237,7 +237,7 @@ def char_by_char(
237237 be a single curses text attribute or a tuple of curses text
238238 attribute. This defaults an empty tuple.
239239
240- :param words_attr: Dictionary composed of string as a key and a
240+ :param words_attr: Mapping composed of string as a key and a
241241 single curses text attribute or tuple as a value. Each key
242242 is colored with its associated values This defaults to an
243243 empty dictionary.
@@ -311,9 +311,9 @@ def word_by_word(
311311 colors_pair_nb : int = 0 ,
312312 text_attr : Union [CursesTextAttrConstant ,
313313 CursesTextAttrConstants ] = (),
314- words_attr : Dict [Sequence [str ],
315- Union [CursesTextAttrConstant ,
316- CursesTextAttrConstants ]] = {},
314+ words_attr : Mapping [Sequence [str ],
315+ Union [CursesTextAttrConstant ,
316+ CursesTextAttrConstants ]] = {},
317317 word_delimiter : str = " " ,
318318 flash_screen : bool = False ,
319319 delay : int = 150 ,
@@ -339,7 +339,7 @@ def word_by_word(
339339 be a single curses text attribute or a tuple of curses text
340340 attribute. This defaults an empty tuple.
341341
342- :param words_attr: Dictionary composed of string as a key and a
342+ :param words_attr: Mapping composed of string as a key and a
343343 single curses text attribute or tuple as a value. Each key
344344 is colored with its associated values This defaults to an
345345 empty dictionary.
0 commit comments