diff --git a/pyproject.toml b/pyproject.toml index 8d31dbc..0c5df87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ testpaths = [ "tests", ] files = ["src", "tests"] exclude = "class_soc_calc\\.py$" check_untyped_defs = true -warn_unused_ignores = false +warn_unused_ignores = true [[tool.mypy.overrides]] module = "akkudoktoreos.*" diff --git a/src/akkudoktoreos/server/eos.py b/src/akkudoktoreos/server/eos.py index 389af37..378f1b4 100755 --- a/src/akkudoktoreos/server/eos.py +++ b/src/akkudoktoreos/server/eos.py @@ -204,9 +204,9 @@ async def server_shutdown_task() -> None: # Gracefully shut down this process. pid = psutil.Process().pid if os.name == "nt": - os.kill(pid, signal.CTRL_C_EVENT) # type: ignore[attr-defined] + os.kill(pid, signal.CTRL_C_EVENT) # type: ignore[attr-defined,unused-ignore] else: - os.kill(pid, signal.SIGTERM) # type: ignore[attr-defined] + os.kill(pid, signal.SIGTERM) # type: ignore[attr-defined,unused-ignore] logger.info(f"🚀 EOS terminated, PID {pid}") diff --git a/tests/test_server.py b/tests/test_server.py index 376d460..0fdb2ca 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -240,9 +240,9 @@ class TestServerStartStop: host = get_default_host() if os.name == "nt": # Windows does not provide SIGKILL - sigkill = signal.SIGTERM # type: ignore[attr-defined] + sigkill = signal.SIGTERM # type: ignore[attr-defined,unused-ignore] else: - sigkill = signal.SIGKILL # type: ignore + sigkill = signal.SIGKILL # type: ignore[attr-defined,unused-ignore] port = 8503 eosdash_port = 8504 timeout = 120