From 0367a01287d37a9fe62eda12092cb4506f83b07b Mon Sep 17 00:00:00 2001 From: Kevin McCormack Date: Thu, 9 Oct 2025 11:50:24 -0400 Subject: [PATCH] Enable strict typing for GitHub integration (#154048) --- .strict-typing | 1 + homeassistant/components/github/coordinator.py | 2 +- mypy.ini | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.strict-typing b/.strict-typing index 291c3d78e67..e125deb7cac 100644 --- a/.strict-typing +++ b/.strict-typing @@ -221,6 +221,7 @@ homeassistant.components.generic_thermostat.* homeassistant.components.geo_location.* homeassistant.components.geocaching.* homeassistant.components.gios.* +homeassistant.components.github.* homeassistant.components.glances.* homeassistant.components.go2rtc.* homeassistant.components.goalzero.* diff --git a/homeassistant/components/github/coordinator.py b/homeassistant/components/github/coordinator.py index adeda1fd88a..8b531907996 100644 --- a/homeassistant/components/github/coordinator.py +++ b/homeassistant/components/github/coordinator.py @@ -167,6 +167,6 @@ class GitHubDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]): ) self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, self.unsubscribe) - def unsubscribe(self, *args) -> None: + def unsubscribe(self, *args: Any) -> None: """Unsubscribe to repository events.""" self._client.repos.events.unsubscribe(subscription_id=self._subscription_id) diff --git a/mypy.ini b/mypy.ini index 81776140629..f7a36041fa9 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1966,6 +1966,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.github.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.glances.*] check_untyped_defs = true disallow_incomplete_defs = true