@@ -57,7 +57,7 @@ class MessageStyle(NamedTuple):
57
57
"""The color name (see `ANSI_COLORS` for available values)
58
58
or the color number when 256 colors are available
59
59
"""
60
- style : Tuple [str , ...]
60
+ style : Tuple [str , ...] = ()
61
61
"""Tuple of style strings (see `ANSI_COLORS` for available values).
62
62
"""
63
63
@@ -237,10 +237,10 @@ class ColorizedTextReporter(TextReporter):
237
237
238
238
name = "colorized"
239
239
COLOR_MAPPING : ColorMappingDict = {
240
- "I" : MessageStyle ("green" , () ),
240
+ "I" : MessageStyle ("green" ),
241
241
"C" : MessageStyle (None , ("bold" ,)),
242
242
"R" : MessageStyle ("magenta" , ("bold" , "italic" )),
243
- "W" : MessageStyle ("magenta" , () ),
243
+ "W" : MessageStyle ("magenta" ),
244
244
"E" : MessageStyle ("red" , ("bold" ,)),
245
245
"F" : MessageStyle ("red" , ("bold" , "underline" )),
246
246
"S" : MessageStyle ("yellow" , ("inverse" ,)), # S stands for module Separator
@@ -299,7 +299,7 @@ def __init__(
299
299
300
300
def _get_decoration (self , msg_id : str ) -> MessageStyle :
301
301
"""Returns the message style as defined in self.color_mapping"""
302
- return self .color_mapping .get (msg_id [0 ]) or MessageStyle (None , () )
302
+ return self .color_mapping .get (msg_id [0 ]) or MessageStyle (None )
303
303
304
304
def handle_message (self , msg : Message ) -> None :
305
305
"""manage message of different types, and colorize output
0 commit comments