Remove incorrect use of ConfigType in config flows (#53544)

This commit is contained in:
Milan Meulemans 2021-07-27 12:33:17 +02:00 committed by GitHub
parent 0471b27179
commit 348d7a5622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 83 additions and 55 deletions

View file

@ -26,7 +26,6 @@ from homeassistant.const import (
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.typing import ConfigType
from .const import CONF_BASE_PATH, CONF_SERIAL, CONF_UUID, DOMAIN
@ -62,7 +61,9 @@ class IPPFlowHandler(ConfigFlow, domain=DOMAIN):
"""Set up the instance."""
self.discovery_info = {}
async def async_step_user(self, user_input: ConfigType | None = None) -> FlowResult:
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle a flow initiated by the user."""
if user_input is None:
return self._show_setup_form()
@ -98,7 +99,7 @@ class IPPFlowHandler(ConfigFlow, domain=DOMAIN):
return self.async_create_entry(title=user_input[CONF_HOST], data=user_input)
async def async_step_zeroconf(self, discovery_info: ConfigType) -> FlowResult:
async def async_step_zeroconf(self, discovery_info: dict[str, Any]) -> FlowResult:
"""Handle zeroconf discovery."""
port = discovery_info[CONF_PORT]
zctype = discovery_info["type"]
@ -165,7 +166,7 @@ class IPPFlowHandler(ConfigFlow, domain=DOMAIN):
return await self.async_step_zeroconf_confirm()
async def async_step_zeroconf_confirm(
self, user_input: ConfigType = None
self, user_input: dict[str, Any] = None
) -> FlowResult:
"""Handle a confirmation flow initiated by zeroconf."""
if user_input is None: