From 9e43d258391b209b57c2081eec26040df445fd62 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Wed, 21 Apr 2021 13:24:18 +0200 Subject: [PATCH] fix compat --- web/figures.py | 3 ++- web/views.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web/figures.py b/web/figures.py index 089a379..968d69c 100644 --- a/web/figures.py +++ b/web/figures.py @@ -1,4 +1,5 @@ from copy import deepcopy +from typing import List import dash_bootstrap_components as dbc import dash_table @@ -58,7 +59,7 @@ battery_table = None # pylint: disable=too-many-locals -def get_figures(trips: Trips, charging: list[dict]): +def get_figures(trips: Trips, charging: List[dict]): global consumption_fig, consumption_df, trips_map, consumption_fig_by_speed, table_fig, info, battery_info, \ battery_table, consumption_graph_by_temp lats = [] diff --git a/web/views.py b/web/views.py index 4df2549..b5cf414 100644 --- a/web/views.py +++ b/web/views.py @@ -1,6 +1,8 @@ import json import traceback from datetime import datetime, timezone +from typing import List + import dash_bootstrap_components as dbc from dash.dependencies import Output, Input, MATCH, State from dash.exceptions import PreventUpdate @@ -28,7 +30,7 @@ ABRP_SWITCH = 'abrp-switch' ERROR_DIV = dbc.Alert("No data to show, there is probably no trips recorded yet", color="danger") trips: Trips -chargings: list[dict] +chargings: List[dict] min_date = max_date = min_millis = max_millis = step = marks = cached_layout = None