summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg/device.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-09-04 18:08:40 +0300
committerMaxim Devaev <[email protected]>2022-09-04 18:08:40 +0300
commitee3e224e396494cd0d69bb6167087a071a20349c (patch)
tree5becd28570e58a03c6e1e231d0db24c264a73f88 /kvmd/plugins/hid/otg/device.py
parent4b75221e9470b4a009955d7677f16adf8e23e302 (diff)
new typing style
Diffstat (limited to 'kvmd/plugins/hid/otg/device.py')
-rw-r--r--kvmd/plugins/hid/otg/device.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/kvmd/plugins/hid/otg/device.py b/kvmd/plugins/hid/otg/device.py
index 2dc11d6c..630ad186 100644
--- a/kvmd/plugins/hid/otg/device.py
+++ b/kvmd/plugins/hid/otg/device.py
@@ -28,9 +28,7 @@ import errno
import logging
import time
-from typing import Dict
from typing import Generator
-from typing import Optional
from ....logging import get_logger
@@ -48,7 +46,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
self,
name: str,
read_size: int,
- initial_state: Dict,
+ initial_state: dict,
notifier: aiomulti.AioProcessNotifier,
device_path: str,
@@ -76,7 +74,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
self.__stop_event = multiprocessing.Event()
self.__no_device_reported = False
- self.__logger: Optional[logging.Logger] = None
+ self.__logger: (logging.Logger | None) = None
def start(self, udc: str) -> None: # type: ignore # pylint: disable=arguments-differ
self.__udc_state_path = usb.get_udc_path(udc, usb.U_STATE)
@@ -125,7 +123,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
self.__close_device()
- async def get_state(self) -> Dict:
+ async def get_state(self) -> dict:
return (await self.__state_flags.get())
# =====