@@ -28,9 +28,9 @@ class ScreenLogger:
2828
2929 _default_cell_size = 9
3030 _default_precision = 4
31- _colour_new_max = Fore .MAGENTA
32- _colour_regular_message = Fore .RESET
33- _colour_reset = Fore .RESET
31+ _color_new_max = Fore .MAGENTA
32+ _color_regular_message = Fore .RESET
33+ _color_reset = Fore .RESET
3434
3535 def __init__ (self , verbose : int = 2 , is_constrained : bool = False ) -> None :
3636 self ._verbose = verbose
@@ -142,7 +142,7 @@ def _print_step(
142142 keys : list [str ],
143143 result : dict [str , Any ],
144144 params_config : Mapping [str , ParamsType ],
145- colour : str = _colour_regular_message ,
145+ color : str = _color_regular_message ,
146146 ) -> str :
147147 """Print a step.
148148
@@ -157,9 +157,9 @@ def _print_step(
157157 params_config : Mapping[str, ParamsType]
158158 The configuration to map the key to the parameter for correct formatting.
159159
160- colour : str, optional
160+ color : str, optional
161161 Color to use for the output.
162- (Default value = _colour_regular_message , equivalent to Fore.RESET)
162+ (Default value = _color_regular_message , equivalent to Fore.RESET)
163163
164164 Returns
165165 -------
@@ -178,7 +178,7 @@ def _print_step(
178178 else params_config [key ].to_string (val , self ._default_cell_size )
179179 for key , val in params .items ()
180180 ]
181- return "| " + " | " .join (colour + x + self ._colour_reset for x in cells if x is not None ) + " |"
181+ return "| " + " | " .join (color + x + self ._color_reset for x in cells if x is not None ) + " |"
182182
183183 def _print_header (self , keys : list [str ]) -> str :
184184 """Print the header of the log.
@@ -283,8 +283,8 @@ def log_optimization_step(
283283 return
284284
285285 if self ._verbose == 2 or is_new_max :
286- colour = self ._colour_new_max if is_new_max else self ._colour_regular_message
287- line = self ._print_step (keys , result , params_config , colour = colour ) + "\n "
286+ color = self ._color_new_max if is_new_max else self ._color_regular_message
287+ line = self ._print_step (keys , result , params_config , color = color ) + "\n "
288288 if self ._verbose :
289289 print (line , end = "" )
290290
0 commit comments