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:
@@ -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.*
|
||||||
|
|||||||
@@ -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
10
mypy.ini
generated
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user