summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvmd/aiotools.py2
-rw-r--r--kvmd/apps/kvmd/http.py4
-rw-r--r--kvmd/apps/vnc/keysym.py4
-rw-r--r--kvmd/apps/vnc/rfb/__init__.py2
-rw-r--r--kvmd/apps/vnc/server.py2
-rw-r--r--testenv/tox.ini2
6 files changed, 7 insertions, 9 deletions
diff --git a/kvmd/aiotools.py b/kvmd/aiotools.py
index bd4bd37e..6f76423e 100644
--- a/kvmd/aiotools.py
+++ b/kvmd/aiotools.py
@@ -204,5 +204,5 @@ async def run_region_task(
if entered.done():
return
- if (exc := task.exception()) is not None: # noqa: E203,E231
+ if (exc := task.exception()) is not None:
raise exc
diff --git a/kvmd/apps/kvmd/http.py b/kvmd/apps/kvmd/http.py
index 69dfa6ff..f46e8b13 100644
--- a/kvmd/apps/kvmd/http.py
+++ b/kvmd/apps/kvmd/http.py
@@ -69,7 +69,7 @@ def get_exposed_http(obj: object) -> List[HttpExposed]:
handler=handler,
)
for name in dir(obj)
- if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _HTTP_EXPOSED, False) # noqa: E203
+ if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _HTTP_EXPOSED, False)
]
@@ -99,7 +99,7 @@ def get_exposed_ws(obj: object) -> List[WsExposed]:
handler=handler,
)
for name in dir(obj)
- if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _WS_EXPOSED, False) # noqa: E203
+ if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _WS_EXPOSED, False)
]
diff --git a/kvmd/apps/vnc/keysym.py b/kvmd/apps/vnc/keysym.py
index 5f35c28b..275eee5e 100644
--- a/kvmd/apps/vnc/keysym.py
+++ b/kvmd/apps/vnc/keysym.py
@@ -41,7 +41,7 @@ def build_symmap(path: str) -> Dict[int, str]:
symmap[x11_code] = keymap.AT1_TO_WEB[at1_code]
for (x11_code, at1_code) in _read_keyboard_layout(path).items():
- if (web_name := keymap.AT1_TO_WEB.get(at1_code)) is not None: # noqa: E203,E231
+ if (web_name := keymap.AT1_TO_WEB.get(at1_code)) is not None:
# mypy bug
symmap[x11_code] = web_name # type: ignore
return symmap
@@ -89,7 +89,7 @@ def _read_keyboard_layout(path: str) -> Dict[int, int]: # Keysym to evdev (at1)
parts = line.split()
if len(parts) >= 2:
- if (code := _resolve_keysym(parts[0])) != 0: # noqa: E203,E231
+ if (code := _resolve_keysym(parts[0])) != 0:
try:
layout[code] = int(parts[1], 16)
except ValueError as err:
diff --git a/kvmd/apps/vnc/rfb/__init__.py b/kvmd/apps/vnc/rfb/__init__.py
index 70ed087d..279c18bf 100644
--- a/kvmd/apps/vnc/rfb/__init__.py
+++ b/kvmd/apps/vnc/rfb/__init__.py
@@ -365,7 +365,7 @@ class RfbClient(RfbClientStream): # pylint: disable=too-many-instance-attribute
}
while True:
msg_type = await self._read_number("B")
- if (handler := handlers.get(msg_type)) is not None: # noqa: E203,E231
+ if (handler := handlers.get(msg_type)) is not None:
await handler() # type: ignore # mypy bug
else:
raise RfbError(f"Unknown message type: {msg_type}")
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py
index 15eb2402..e2ac697c 100644
--- a/kvmd/apps/vnc/server.py
+++ b/kvmd/apps/vnc/server.py
@@ -249,7 +249,7 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
# =====
async def _on_key_event(self, code: int, state: bool) -> None:
- if (web_name := self.__symmap.get(code)) is not None: # noqa: E203,E231
+ if (web_name := self.__symmap.get(code)) is not None:
await self.__ws_writer_queue.put({
"event_type": "key",
"event": {"key": web_name, "state": state},
diff --git a/testenv/tox.ini b/testenv/tox.ini
index 0c0c9f29..b73355f5 100644
--- a/testenv/tox.ini
+++ b/testenv/tox.ini
@@ -10,9 +10,7 @@ changedir = /src
[testenv:flake8]
whitelist_externals = bash
commands = bash -c 'flake8 --config=testenv/linters/flake8.ini kvmd testenv/tests *.py'
-# FIXME: pyflakes from master to support walrus
deps =
- git+https://github.com/PyCQA/pyflakes@1911c20#egg=pyflakes
flake8
flake8-quotes
-rrequirements.txt