From 9cd2a79e2d01d79de84a68a94e8cd44c6f35aefc Mon Sep 17 00:00:00 2001 From: jkerdreux-imt <jerome.kerdreux@imt-atlantique.fr> Date: Mon, 16 Dec 2024 16:38:26 +0100 Subject: [PATCH] Py 3.8 doesn't support type dict[] Switch to Dict[] --- libs/lib/xaal/lib/devices.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/lib/xaal/lib/devices.py b/libs/lib/xaal/lib/devices.py index 424f6d12..192d979b 100644 --- a/libs/lib/xaal/lib/devices.py +++ b/libs/lib/xaal/lib/devices.py @@ -21,7 +21,7 @@ import logging import time import typing -from typing import Any, Optional, Union, Callable, Awaitable +from typing import Any, Optional, Union, Callable, Awaitable, Dict from tabulate import tabulate @@ -133,7 +133,7 @@ class Device(object): self.next_alive = 0 # Default attributes & methods self.__attributes = Attributes() - self.methods: dict[str, MethodT] = { + self.methods: Dict[str, MethodT] = { 'get_attributes': self._get_attributes, 'get_description': self._get_description, } @@ -225,7 +225,7 @@ class Device(object): if name in self.methods: del self.methods[name] - def get_methods(self) -> dict[str, MethodT]: + def get_methods(self) -> Dict[str, MethodT]: return self.methods def update_alive(self): -- GitLab