Add Discovergy to strict-typing (#101782)
parent
ba91aaa28d
commit
9b785ef766
|
@ -103,6 +103,7 @@ homeassistant.components.devolo_home_control.*
|
|||
homeassistant.components.devolo_home_network.*
|
||||
homeassistant.components.dhcp.*
|
||||
homeassistant.components.diagnostics.*
|
||||
homeassistant.components.discovergy.*
|
||||
homeassistant.components.dlna_dmr.*
|
||||
homeassistant.components.dnsip.*
|
||||
homeassistant.components.doorbird.*
|
||||
|
|
|
@ -60,15 +60,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
"""Handle the initial step."""
|
||||
self.existing_entry = await self.async_set_unique_id(self.context["unique_id"])
|
||||
|
||||
if entry_data is None:
|
||||
return self.async_show_form(
|
||||
step_id="reauth",
|
||||
data_schema=make_schema(
|
||||
self.existing_entry.data[CONF_EMAIL] or "",
|
||||
self.existing_entry.data[CONF_PASSWORD] or "",
|
||||
),
|
||||
)
|
||||
|
||||
return await self._validate_and_save(entry_data, step_id="reauth")
|
||||
|
||||
async def _validate_and_save(
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""Provide info to system health."""
|
||||
from typing import Any
|
||||
|
||||
from pydiscovergy.const import API_BASE
|
||||
|
||||
from homeassistant.components import system_health
|
||||
|
@ -13,7 +15,7 @@ def async_register(
|
|||
register.async_register_info(system_health_info)
|
||||
|
||||
|
||||
async def system_health_info(hass):
|
||||
async def system_health_info(hass: HomeAssistant) -> dict[str, Any]:
|
||||
"""Get info for the info page."""
|
||||
return {
|
||||
"api_endpoint_reachable": system_health.async_check_can_reach_url(
|
||||
|
|
10
mypy.ini
10
mypy.ini
|
@ -792,6 +792,16 @@ warn_return_any = true
|
|||
warn_unreachable = true
|
||||
no_implicit_reexport = true
|
||||
|
||||
[mypy-homeassistant.components.discovergy.*]
|
||||
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.dlna_dmr.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
|
Loading…
Reference in New Issue