From db27aee62aad087890c81caed703fa42af769bdd Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:22:14 +0100 Subject: [PATCH] Fix ping TypeError when killing the process (#157794) --- homeassistant/components/ping/helpers.py | 2 +- tests/components/ping/test_helpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/ping/helpers.py b/homeassistant/components/ping/helpers.py index 8000cbcddde0..ec77fe1b189f 100644 --- a/homeassistant/components/ping/helpers.py +++ b/homeassistant/components/ping/helpers.py @@ -162,7 +162,7 @@ class PingDataSubProcess(PingData): if pinger: with suppress(TypeError, ProcessLookupError): - await pinger.kill() # type: ignore[func-returns-value] + pinger.kill() del pinger return None diff --git a/tests/components/ping/test_helpers.py b/tests/components/ping/test_helpers.py index 5a90c6b75b2a..7c0709c87379 100644 --- a/tests/components/ping/test_helpers.py +++ b/tests/components/ping/test_helpers.py @@ -22,7 +22,7 @@ class MockAsyncSubprocess: """Fails immediately with a timeout.""" raise TimeoutError - async def kill(self) -> None: + def kill(self) -> None: """Raise preset exception when called.""" raise self.killsig