From d91c785dc7c5e773399ffffaf16798ebf50a7291 Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Fri, 13 Oct 2023 01:07:13 -0300 Subject: [PATCH] Started new plot impl --- plot/scripts/plotter.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/plot/scripts/plotter.py b/plot/scripts/plotter.py index df9c1febb..09a270030 100644 --- a/plot/scripts/plotter.py +++ b/plot/scripts/plotter.py @@ -4,28 +4,6 @@ import plotly.graph_objects as go -def remove_empty_keys(d): - """ - Recursively remove empty keys (both keys with empty values - and empty lists/dictionaries). - If a key is empty, it is removed from the dictionary. - If a key is a list/dictionary, it is recursively processed. - """ - result = d - for k in list(result.keys()): - if isinstance(result[k], dict): - result[k] = remove_empty_keys(result[k]) - if not len(result[k]): - result.pop(k) - elif isinstance(result[k], list): - if not len(result[k]): - result.pop(k) - else: - if not result[k]: - result.pop(k) - return result - - def is_valid_file(parser, arg): """ Check if the provided file path exists. @@ -82,8 +60,6 @@ def process_trace(trace): if k not in accepted: trace.pop(k) - trace = remove_empty_keys(trace) - return map_trace_type_to_plotly_object(trace_type)(trace)