From 24c3f275052c9ff580121e5b1f8bd07da979be59 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Sun, 15 Sep 2024 00:09:38 -0400 Subject: [PATCH] fix(utils): include type in dictionary log Signed-off-by: Cameron Smith --- src/pyrovelocity/utils.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pyrovelocity/utils.py b/src/pyrovelocity/utils.py index 743498f26..5f06fc409 100644 --- a/src/pyrovelocity/utils.py +++ b/src/pyrovelocity/utils.py @@ -177,18 +177,13 @@ def print_attributes(obj): def pretty_log_dict(d: dict) -> str: dict_as_string = "\n" for key, value in d.items(): - # key_colored = colored(key, "green") key_colored = key if isinstance(value, ArrayLike): value_colored = f"{value.shape} {value.dtype}" else: value_lines = str(value).split("\n") - value_colored = "\n".join( - # colored(line, "white") for line in value_lines - line - for line in value_lines - ) - dict_as_string += f"{key_colored}:\n{value_colored}\n" + value_colored = "\n".join(line for line in value_lines) + dict_as_string += f"{key_colored}:\n{type(value)}\n{value_colored}\n\n" return dict_as_string