mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-21 17:06:18 +00:00
fix compat with python 3.7
This commit is contained in:
+2
-1
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user