summaryrefslogtreecommitdiff
path: root/kvmd/apps/pst
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/apps/pst
parent4b75221e9470b4a009955d7677f16adf8e23e302 (diff)
new typing style
Diffstat (limited to 'kvmd/apps/pst')
-rw-r--r--kvmd/apps/pst/__init__.py5
-rw-r--r--kvmd/apps/pst/server.py7
2 files changed, 3 insertions, 9 deletions
diff --git a/kvmd/apps/pst/__init__.py b/kvmd/apps/pst/__init__.py
index 2bb29a08..8f92e39d 100644
--- a/kvmd/apps/pst/__init__.py
+++ b/kvmd/apps/pst/__init__.py
@@ -20,9 +20,6 @@
# ========================================================================== #
-from typing import List
-from typing import Optional
-
from ...logging import get_logger
from .. import init
@@ -31,7 +28,7 @@ from .server import PstServer
# =====
-def main(argv: Optional[List[str]]=None) -> None:
+def main(argv: (list[str] | None)=None) -> None:
config = init(
prog="kvmd-pst",
description="The KVMD persistent storage manager",
diff --git a/kvmd/apps/pst/server.py b/kvmd/apps/pst/server.py
index a492a29b..1df26f61 100644
--- a/kvmd/apps/pst/server.py
+++ b/kvmd/apps/pst/server.py
@@ -23,9 +23,6 @@
import os
import asyncio
-from typing import List
-from typing import Dict
-
from aiohttp.web import Request
from aiohttp.web import WebSocketResponse
@@ -48,7 +45,7 @@ class PstServer(HttpServer): # pylint: disable=too-many-arguments,too-many-inst
storage_path: str,
ro_retries_delay: float,
ro_cleanup_delay: float,
- remount_cmd: List[str],
+ remount_cmd: list[str],
) -> None:
super().__init__()
@@ -69,7 +66,7 @@ class PstServer(HttpServer): # pylint: disable=too-many-arguments,too-many-inst
return (await self._ws_loop(ws))
@exposed_ws("ping")
- async def __ws_ping_handler(self, ws: WsSession, _: Dict) -> None:
+ async def __ws_ping_handler(self, ws: WsSession, _: dict) -> None:
await ws.send_event("pong", {})
# ===== SYSTEM STUFF