diff options
author | Maxim Devaev <[email protected]> | 2022-09-04 18:08:40 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-09-04 18:08:40 +0300 |
commit | ee3e224e396494cd0d69bb6167087a071a20349c (patch) | |
tree | 5becd28570e58a03c6e1e231d0db24c264a73f88 /kvmd/plugins/ugpio/wol.py | |
parent | 4b75221e9470b4a009955d7677f16adf8e23e302 (diff) |
new typing style
Diffstat (limited to 'kvmd/plugins/ugpio/wol.py')
-rw-r--r-- | kvmd/plugins/ugpio/wol.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kvmd/plugins/ugpio/wol.py b/kvmd/plugins/ugpio/wol.py index 42383d84..67875ad9 100644 --- a/kvmd/plugins/ugpio/wol.py +++ b/kvmd/plugins/ugpio/wol.py @@ -23,9 +23,7 @@ import socket import functools -from typing import Dict from typing import Callable -from typing import Optional from typing import Any from ...logging import get_logger @@ -61,7 +59,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute self.__mac = mac @classmethod - def get_plugin_options(cls) -> Dict: + def get_plugin_options(cls) -> dict: return { "ip": Option("255.255.255.255", type=functools.partial(valid_ip, v6=False)), "port": Option(9, type=valid_port), @@ -81,7 +79,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute if not state: return - sock: Optional[socket.socket] = None + sock: (socket.socket | None) = None try: # TODO: IPv6 support: http://lists.cluenet.de/pipermail/ipv6-ops/2014-September/010139.html sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |