@@ -316,7 +316,11 @@ def setup_island_args(
316316# ---------------------------------------------------------------------------
317317
318318
319- def print_dict_rec (base_dict : Dict [str , Any ], forbidden_keys : Optional [List [str ]] = None ) -> None :
319+ def print_dict_rec (
320+ base_dict : Dict [str , Any ],
321+ forbidden_keys : Optional [List [str ]] = None ,
322+ indent : int = 0 ,
323+ ) -> None :
320324 """Recursively prints a dictionary in a formatted hierarchical structure.
321325
322326 For nested dictionaries, prints a header with the key name surrounded by
@@ -328,17 +332,18 @@ def print_dict_rec(base_dict: Dict[str, Any], forbidden_keys: Optional[List[str]
328332 dictionaries will be recursively printed with indentation headers.
329333 forbidden_keys: List of forbidden keys that will not be printed.
330334 Recursively passed to nested dicts.
335+ indent: Auxiliary integer for indentation.
331336 """
337+ prefix : str = " " * indent
332338 for key , value in base_dict .items ():
333339 if isinstance (value , dict ):
334- print (f" === { key } START ===" )
335- print_dict_rec (value , forbidden_keys )
336- print (f" === { key } END ===" )
340+ print (f"{ prefix } { key } :" )
341+ print_dict_rec (value , forbidden_keys , indent + 1 )
337342 else :
338343 if forbidden_keys is None or key not in forbidden_keys :
339- print (f"{ key } :{ value } " )
344+ print (f"{ prefix } { key } : { value } " )
340345 else :
341- print (f"{ key } :***" )
346+ print (f"{ prefix } { key } : ***" )
342347
343348
344349def display_run_data (
0 commit comments