1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-20 02:48:57 +00:00

Enable strict typing for GitHub integration (#154048)

This commit is contained in:
Kevin McCormack
2025-10-09 11:50:24 -04:00
committed by GitHub
parent 86e2c2f361
commit 0367a01287
3 changed files with 12 additions and 1 deletions

View File

@@ -221,6 +221,7 @@ homeassistant.components.generic_thermostat.*
homeassistant.components.geo_location.* homeassistant.components.geo_location.*
homeassistant.components.geocaching.* homeassistant.components.geocaching.*
homeassistant.components.gios.* homeassistant.components.gios.*
homeassistant.components.github.*
homeassistant.components.glances.* homeassistant.components.glances.*
homeassistant.components.go2rtc.* homeassistant.components.go2rtc.*
homeassistant.components.goalzero.* homeassistant.components.goalzero.*

View File

@@ -167,6 +167,6 @@ class GitHubDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
) )
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, self.unsubscribe) 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.""" """Unsubscribe to repository events."""
self._client.repos.events.unsubscribe(subscription_id=self._subscription_id) self._client.repos.events.unsubscribe(subscription_id=self._subscription_id)

10
mypy.ini generated
View File

@@ -1966,6 +1966,16 @@ disallow_untyped_defs = true
warn_return_any = true warn_return_any = true
warn_unreachable = 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.*] [mypy-homeassistant.components.glances.*]
check_untyped_defs = true check_untyped_defs = true
disallow_incomplete_defs = true disallow_incomplete_defs = true