mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Add AndroidTV remote to strict typing (#105571)
Co-authored-by: Robert Resch <robert@resch.dev>
This commit is contained in:
parent
e59e1d7f8e
commit
0d049d73cf
@ -62,6 +62,7 @@ homeassistant.components.amcrest.*
|
|||||||
homeassistant.components.ampio.*
|
homeassistant.components.ampio.*
|
||||||
homeassistant.components.analytics.*
|
homeassistant.components.analytics.*
|
||||||
homeassistant.components.android_ip_webcam.*
|
homeassistant.components.android_ip_webcam.*
|
||||||
|
homeassistant.components.androidtv_remote.*
|
||||||
homeassistant.components.anova.*
|
homeassistant.components.anova.*
|
||||||
homeassistant.components.anthemav.*
|
homeassistant.components.anthemav.*
|
||||||
homeassistant.components.apcupsd.*
|
homeassistant.components.apcupsd.*
|
||||||
|
@ -14,7 +14,7 @@ from androidtvremote2 import (
|
|||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_HOST, CONF_NAME, EVENT_HOMEASSISTANT_STOP, Platform
|
from homeassistant.const import CONF_HOST, CONF_NAME, EVENT_HOMEASSISTANT_STOP, Platform
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import Event, HomeAssistant, callback
|
||||||
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
@ -69,7 +69,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def on_hass_stop(event) -> None:
|
def on_hass_stop(event: Event) -> None:
|
||||||
"""Stop push updates when hass stops."""
|
"""Stop push updates when hass stops."""
|
||||||
api.disconnect()
|
api.disconnect()
|
||||||
|
|
||||||
|
10
mypy.ini
10
mypy.ini
@ -380,6 +380,16 @@ disallow_untyped_defs = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
|
|
||||||
|
[mypy-homeassistant.components.androidtv_remote.*]
|
||||||
|
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.anova.*]
|
[mypy-homeassistant.components.anova.*]
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
disallow_incomplete_defs = true
|
disallow_incomplete_defs = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user