Skip to content
Snippets Groups Projects
Commit 9cd2a79e authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Py 3.8 doesn't support type dict[]

Switch to Dict[]
parent ee12f8fd
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment