From ee3e224e396494cd0d69bb6167087a071a20349c Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 4 Sep 2022 18:08:40 +0300 Subject: new typing style --- kvmd/plugins/hid/_mcu/gpio.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'kvmd/plugins/hid/_mcu/gpio.py') diff --git a/kvmd/plugins/hid/_mcu/gpio.py b/kvmd/plugins/hid/_mcu/gpio.py index e3c7f7b7..f4985061 100644 --- a/kvmd/plugins/hid/_mcu/gpio.py +++ b/kvmd/plugins/hid/_mcu/gpio.py @@ -23,9 +23,6 @@ import types import time -from typing import Type -from typing import Optional - import gpiod from ....logging import get_logger @@ -46,8 +43,8 @@ class Gpio: self.__reset_inverted = reset_inverted self.__reset_delay = reset_delay - self.__chip: Optional[gpiod.Chip] = None - self.__reset_line: Optional[gpiod.Line] = None + self.__chip: (gpiod.Chip | None) = None + self.__reset_line: (gpiod.Line | None) = None def __enter__(self) -> None: if self.__reset_pin >= 0: @@ -59,7 +56,7 @@ class Gpio: def __exit__( self, - _exc_type: Type[BaseException], + _exc_type: type[BaseException], _exc: BaseException, _tb: types.TracebackType, ) -> None: -- cgit v1.2.3