diff --git a/eit_dash/utils/common.py b/eit_dash/utils/common.py index 3ed9ac8..c025ec4 100644 --- a/eit_dash/utils/common.py +++ b/eit_dash/utils/common.py @@ -38,7 +38,10 @@ def create_filter_results_card(parameters: dict) -> dbc.Card: card_list = [ html.H4("Data filtered", className="card-title"), ] - card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in parameters.items()] + card_list += [ + dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) + for data, value in parameters.items() + ] return dbc.Card(dbc.CardBody(card_list), id=ids.FILTERING_SAVED_CARD) @@ -64,7 +67,10 @@ def create_info_card(dataset: Sequence, remove_button: bool = False) -> dbc.Card html.H4(dataset.label, className="card-title"), html.H6(dataset.eit_data["raw"].vendor, className="card-subtitle"), ] - card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in info_data.items()] + card_list += [ + dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) + for data, value in info_data.items() + ] if remove_button: card_list += [ dbc.Button( @@ -100,7 +106,10 @@ def create_selected_period_card( card_list = [ html.H4(period.label, className="card-title"), ] - card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in info_data.items()] + card_list += [ + dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) + for data, value in info_data.items() + ] if remove_button: card_list += [ dbc.Button( @@ -238,7 +247,7 @@ def mark_selected_periods( ) selected_signal = go.Scatter(**params).to_plotly_json() - if type(original_figure) == go.Figure: + if isinstance(original_figure, go.Figure): original_figure.add_trace(selected_signal) else: original_figure["data"].append(selected_signal)