Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wbaccinelli committed Aug 2, 2024
1 parent 888e1b5 commit a320686
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions eit_dash/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a320686

Please sign in to comment.