mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix schema typing (1) (#120443)
This commit is contained in:
parent
f017134199
commit
197062139e
@ -111,7 +111,7 @@ class ForkedDaapdFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize."""
|
||||
self.discovery_schema = None
|
||||
self.discovery_schema: vol.Schema | None = None
|
||||
|
||||
@staticmethod
|
||||
@callback
|
||||
|
@ -75,9 +75,7 @@ class LinearGarageDoorConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle the initial step."""
|
||||
data_schema = STEP_USER_DATA_SCHEMA
|
||||
|
||||
data_schema = vol.Schema(data_schema)
|
||||
data_schema = vol.Schema(STEP_USER_DATA_SCHEMA)
|
||||
|
||||
if user_input is None:
|
||||
return self.async_show_form(step_id="user", data_schema=data_schema)
|
||||
|
@ -75,7 +75,7 @@ class MotionBlindsFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
"""Initialize the Motionblinds flow."""
|
||||
self._host: str | None = None
|
||||
self._ips: list[str] = []
|
||||
self._config_settings = None
|
||||
self._config_settings: vol.Schema | None = None
|
||||
|
||||
@staticmethod
|
||||
@callback
|
||||
|
@ -138,7 +138,7 @@ class SynologyDSMFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
user_input = {}
|
||||
|
||||
description_placeholders = {}
|
||||
data_schema = {}
|
||||
data_schema = None
|
||||
|
||||
if step_id == "link":
|
||||
user_input.update(self.discovered_conf)
|
||||
|
@ -188,7 +188,7 @@ class VizioConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize config flow."""
|
||||
self._user_schema = None
|
||||
self._user_schema: vol.Schema | None = None
|
||||
self._must_show_form: bool | None = None
|
||||
self._ch_type: str | None = None
|
||||
self._pairing_token: str | None = None
|
||||
|
@ -221,7 +221,7 @@ class BaseZhaFlow(ConfigEntryBaseFlow):
|
||||
return await self.async_step_verify_radio()
|
||||
|
||||
# Pre-select the currently configured port
|
||||
default_port = vol.UNDEFINED
|
||||
default_port: vol.Undefined | str = vol.UNDEFINED
|
||||
|
||||
if self._radio_mgr.device_path is not None:
|
||||
for description, port in zip(list_of_ports, ports, strict=False):
|
||||
@ -251,7 +251,7 @@ class BaseZhaFlow(ConfigEntryBaseFlow):
|
||||
return await self.async_step_manual_port_config()
|
||||
|
||||
# Pre-select the current radio type
|
||||
default = vol.UNDEFINED
|
||||
default: vol.Undefined | str = vol.UNDEFINED
|
||||
|
||||
if self._radio_mgr.radio_type is not None:
|
||||
default = self._radio_mgr.radio_type.description
|
||||
|
Loading…
x
Reference in New Issue
Block a user