From 32c7e548bc9caac63d4ffe664e8271712586c3ac Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Tue, 23 Mar 2021 18:50:44 +0100 Subject: [PATCH] fix compat with python 3.7 --- MyPSACC.py | 3 ++- Trip.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MyPSACC.py b/MyPSACC.py index 3b99997..d7a6230 100644 --- a/MyPSACC.py +++ b/MyPSACC.py @@ -13,6 +13,7 @@ from time import sleep from oauth2_client.credentials_manager import CredentialManager, ServiceInformation import paho.mqtt.client as mqtt from requests import Response +from typing import Tuple import psa_connectedcar as psac from Car import Cars, Car @@ -580,7 +581,7 @@ class MyPSACC: return geo_dumps(feature_collection, sort_keys=True) @staticmethod - def get_chargings(mini=None, maxi=None) -> tuple[dict]: + def get_chargings(mini=None, maxi=None) -> Tuple[dict]: conn = get_db() if mini is not None: if maxi is not None: diff --git a/Trip.py b/Trip.py index 4e8b7de..aaf1758 100644 --- a/Trip.py +++ b/Trip.py @@ -1,7 +1,7 @@ from __future__ import annotations from statistics import mean -from typing import List +from typing import List, Dict from dateutil import tz from geojson import Feature, FeatureCollection, MultiLineString @@ -119,7 +119,7 @@ class Trips(list): return False @staticmethod - def get_trips(vehicles_list: Cars) -> dict[str, Trips]: + def get_trips(vehicles_list: Cars) -> Dict[str, Trips]: conn = get_db() vehicles = conn.execute( "SELECT DISTINCT vin FROM position;").fetchall()