From c7739a77605cb971187b20c5fb02c037db965b8d Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:54:51 +0200 Subject: [PATCH] Align async_step_reconfigure type hints (#127450) --- homeassistant/components/brother/config_flow.py | 3 +-- homeassistant/components/bryant_evolution/config_flow.py | 3 +-- homeassistant/components/enphase_envoy/config_flow.py | 2 +- homeassistant/components/feedreader/config_flow.py | 3 +-- homeassistant/components/fritz/config_flow.py | 2 +- homeassistant/components/fritzbox/config_flow.py | 2 +- homeassistant/components/google_travel_time/config_flow.py | 3 +-- homeassistant/components/holiday/config_flow.py | 3 +-- homeassistant/components/homeworks/config_flow.py | 3 +-- homeassistant/components/jewish_calendar/config_flow.py | 3 +-- homeassistant/components/lamarzocco/config_flow.py | 2 +- homeassistant/components/lcn/config_flow.py | 3 +-- homeassistant/components/madvr/config_flow.py | 3 +-- homeassistant/components/mealie/config_flow.py | 2 +- homeassistant/components/melcloud/config_flow.py | 2 +- homeassistant/components/nam/config_flow.py | 2 +- homeassistant/components/pyload/config_flow.py | 2 +- homeassistant/components/reolink/config_flow.py | 2 +- homeassistant/components/smhi/config_flow.py | 3 +-- homeassistant/components/solarlog/config_flow.py | 2 +- homeassistant/components/tado/config_flow.py | 3 +-- homeassistant/components/tedee/config_flow.py | 2 +- homeassistant/components/trafikverket_camera/config_flow.py | 2 +- .../components/trafikverket_weatherstation/config_flow.py | 2 +- homeassistant/components/vallox/config_flow.py | 3 +-- homeassistant/components/waze_travel_time/config_flow.py | 3 +-- 26 files changed, 26 insertions(+), 39 deletions(-) diff --git a/homeassistant/components/brother/config_flow.py b/homeassistant/components/brother/config_flow.py index f9c51d3b786..8966b41c948 100644 --- a/homeassistant/components/brother/config_flow.py +++ b/homeassistant/components/brother/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping from typing import Any from brother import Brother, SnmpError, UnsupportedModelError @@ -143,7 +142,7 @@ class BrotherConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self.entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/bryant_evolution/config_flow.py b/homeassistant/components/bryant_evolution/config_flow.py index 7d85406b707..81877542d1a 100644 --- a/homeassistant/components/bryant_evolution/config_flow.py +++ b/homeassistant/components/bryant_evolution/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping import logging from typing import Any @@ -62,7 +61,7 @@ class BryantConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle integration reconfiguration.""" return await self.async_step_reconfigure_confirm() diff --git a/homeassistant/components/enphase_envoy/config_flow.py b/homeassistant/components/enphase_envoy/config_flow.py index 7cc129109fd..391d06fa83e 100644 --- a/homeassistant/components/enphase_envoy/config_flow.py +++ b/homeassistant/components/enphase_envoy/config_flow.py @@ -233,7 +233,7 @@ class EnphaseConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Add reconfigure step to allow to manually reconfigure a config entry.""" self._reconnect_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/feedreader/config_flow.py b/homeassistant/components/feedreader/config_flow.py index 717c66751c4..4555b08e4f4 100644 --- a/homeassistant/components/feedreader/config_flow.py +++ b/homeassistant/components/feedreader/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping import logging from typing import Any import urllib.error @@ -122,7 +121,7 @@ class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN): return await self.async_step_user({CONF_URL: import_data[CONF_URL]}) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self._config_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/fritz/config_flow.py b/homeassistant/components/fritz/config_flow.py index 389f198517a..8dfff1337f9 100644 --- a/homeassistant/components/fritz/config_flow.py +++ b/homeassistant/components/fritz/config_flow.py @@ -336,7 +336,7 @@ class FritzBoxToolsFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_abort(reason="reauth_successful") async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfigure flow .""" self._entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/fritzbox/config_flow.py b/homeassistant/components/fritzbox/config_flow.py index 43463c01afe..fb4ab23a2b2 100644 --- a/homeassistant/components/fritzbox/config_flow.py +++ b/homeassistant/components/fritzbox/config_flow.py @@ -223,7 +223,7 @@ class FritzboxConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self._entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/google_travel_time/config_flow.py b/homeassistant/components/google_travel_time/config_flow.py index 0f1bb582fd7..9b59718c945 100644 --- a/homeassistant/components/google_travel_time/config_flow.py +++ b/homeassistant/components/google_travel_time/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping from typing import Any import voluptuous as vol @@ -238,7 +237,7 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration.""" self._context_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/holiday/config_flow.py b/homeassistant/components/holiday/config_flow.py index 40345fd318c..32b85b5a41d 100644 --- a/homeassistant/components/holiday/config_flow.py +++ b/homeassistant/components/holiday/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping from typing import Any from babel import Locale, UnknownLocaleError @@ -113,7 +112,7 @@ class HolidayConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form(step_id="province", data_schema=province_schema) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle the re-configuration of a province.""" self.config_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/homeworks/config_flow.py b/homeassistant/components/homeworks/config_flow.py index 77c60a47e3f..5d6b95815c6 100644 --- a/homeassistant/components/homeworks/config_flow.py +++ b/homeassistant/components/homeworks/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping from functools import partial import logging from typing import Any @@ -583,7 +582,7 @@ class HomeworksConfigFlowHandler(ConfigFlow, domain=DOMAIN): return user_input async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfigure flow.""" self._context_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/jewish_calendar/config_flow.py b/homeassistant/components/jewish_calendar/config_flow.py index bc277e80c90..67223324ae9 100644 --- a/homeassistant/components/jewish_calendar/config_flow.py +++ b/homeassistant/components/jewish_calendar/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping import logging from typing import Any import zoneinfo @@ -131,7 +130,7 @@ class JewishCalendarConfigFlow(ConfigFlow, domain=DOMAIN): return await self.async_step_user(import_data) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self._config_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/lamarzocco/config_flow.py b/homeassistant/components/lamarzocco/config_flow.py index 92d428ffebe..898a93a014a 100644 --- a/homeassistant/components/lamarzocco/config_flow.py +++ b/homeassistant/components/lamarzocco/config_flow.py @@ -286,7 +286,7 @@ class LmConfigFlow(ConfigFlow, domain=DOMAIN): return await self.async_step_user(user_input) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Perform reconfiguration of the config entry.""" self.reconfigure_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/lcn/config_flow.py b/homeassistant/components/lcn/config_flow.py index bed2b1e1993..a0c911b745e 100644 --- a/homeassistant/components/lcn/config_flow.py +++ b/homeassistant/components/lcn/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping import logging from typing import Any @@ -196,7 +195,7 @@ class LcnFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return self.async_create_entry(title=data[CONF_HOST], data=data) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> config_entries.ConfigFlowResult: """Reconfigure LCN configuration.""" self._context_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/madvr/config_flow.py b/homeassistant/components/madvr/config_flow.py index fe6d45918d1..ea587d11e48 100644 --- a/homeassistant/components/madvr/config_flow.py +++ b/homeassistant/components/madvr/config_flow.py @@ -1,7 +1,6 @@ """Config flow for the integration.""" import asyncio -from collections.abc import Mapping import logging from typing import Any @@ -47,7 +46,7 @@ class MadVRConfigFlow(ConfigFlow, domain=DOMAIN): return await self._handle_config_step(user_input) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration of the device.""" self.entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/mealie/config_flow.py b/homeassistant/components/mealie/config_flow.py index f4aee0ec29b..29c2591c7f8 100644 --- a/homeassistant/components/mealie/config_flow.py +++ b/homeassistant/components/mealie/config_flow.py @@ -118,7 +118,7 @@ class MealieConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration of the integration.""" self.entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/melcloud/config_flow.py b/homeassistant/components/melcloud/config_flow.py index 131e405cef1..72abc0fbca7 100644 --- a/homeassistant/components/melcloud/config_flow.py +++ b/homeassistant/components/melcloud/config_flow.py @@ -149,7 +149,7 @@ class FlowHandler(ConfigFlow, domain=DOMAIN): return acquired_token, errors async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self.entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/nam/config_flow.py b/homeassistant/components/nam/config_flow.py index 07c907276b9..75f3d4b8cd8 100644 --- a/homeassistant/components/nam/config_flow.py +++ b/homeassistant/components/nam/config_flow.py @@ -223,7 +223,7 @@ class NAMFlowHandler(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self.entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/pyload/config_flow.py b/homeassistant/components/pyload/config_flow.py index f82156dc5d6..936cc5f3ea9 100644 --- a/homeassistant/components/pyload/config_flow.py +++ b/homeassistant/components/pyload/config_flow.py @@ -196,7 +196,7 @@ class PyLoadConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Perform a reconfiguration.""" self.config_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/reolink/config_flow.py b/homeassistant/components/reolink/config_flow.py index bf84713336c..be88baf84e4 100644 --- a/homeassistant/components/reolink/config_flow.py +++ b/homeassistant/components/reolink/config_flow.py @@ -136,7 +136,7 @@ class ReolinkFlowHandler(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Perform a reconfiguration.""" config_entry = self.hass.config_entries.async_get_entry( diff --git a/homeassistant/components/smhi/config_flow.py b/homeassistant/components/smhi/config_flow.py index b4c2451bbbf..05b2bf71ca1 100644 --- a/homeassistant/components/smhi/config_flow.py +++ b/homeassistant/components/smhi/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping from typing import Any from smhi.smhi_lib import Smhi, SmhiForecastException @@ -83,7 +82,7 @@ class SmhiFlowHandler(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self.config_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/solarlog/config_flow.py b/homeassistant/components/solarlog/config_flow.py index 054b0bb46a9..9a8703dda33 100644 --- a/homeassistant/components/solarlog/config_flow.py +++ b/homeassistant/components/solarlog/config_flow.py @@ -138,7 +138,7 @@ class SolarLogConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self._entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/tado/config_flow.py b/homeassistant/components/tado/config_flow.py index 23642dcb14d..9fd2030844f 100644 --- a/homeassistant/components/tado/config_flow.py +++ b/homeassistant/components/tado/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping import logging from typing import Any @@ -118,7 +117,7 @@ class TadoConfigFlow(ConfigFlow, domain=DOMAIN): return await self.async_step_user() async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" self.config_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/tedee/config_flow.py b/homeassistant/components/tedee/config_flow.py index d2535a5cd3f..6d399901c9a 100644 --- a/homeassistant/components/tedee/config_flow.py +++ b/homeassistant/components/tedee/config_flow.py @@ -125,7 +125,7 @@ class TedeeConfigFlow(ConfigFlow, domain=DOMAIN): return await self.async_step_user(user_input) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Perform a reconfiguration.""" self.reconfigure_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/trafikverket_camera/config_flow.py b/homeassistant/components/trafikverket_camera/config_flow.py index fb6f6feeccf..19e0adf45e4 100644 --- a/homeassistant/components/trafikverket_camera/config_flow.py +++ b/homeassistant/components/trafikverket_camera/config_flow.py @@ -93,7 +93,7 @@ class TVCameraConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle re-configuration with Trafikverket.""" diff --git a/homeassistant/components/trafikverket_weatherstation/config_flow.py b/homeassistant/components/trafikverket_weatherstation/config_flow.py index 9d1bfd7592a..3e639a930ad 100644 --- a/homeassistant/components/trafikverket_weatherstation/config_flow.py +++ b/homeassistant/components/trafikverket_weatherstation/config_flow.py @@ -119,7 +119,7 @@ class TVWeatherConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle re-configuration with Trafikverket.""" diff --git a/homeassistant/components/vallox/config_flow.py b/homeassistant/components/vallox/config_flow.py index caa33afe60a..1c291f853a5 100644 --- a/homeassistant/components/vallox/config_flow.py +++ b/homeassistant/components/vallox/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping import logging from typing import Any @@ -86,7 +85,7 @@ class ValloxConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration of the Vallox device host address.""" self._context_entry = self._get_reconfigure_entry() diff --git a/homeassistant/components/waze_travel_time/config_flow.py b/homeassistant/components/waze_travel_time/config_flow.py index 6c484d43dcb..9738ec4465f 100644 --- a/homeassistant/components/waze_travel_time/config_flow.py +++ b/homeassistant/components/waze_travel_time/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Mapping from typing import Any import voluptuous as vol @@ -192,7 +191,7 @@ class WazeConfigFlow(ConfigFlow, domain=DOMAIN): ) async def async_step_reconfigure( - self, entry_data: Mapping[str, Any] + self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration.""" self._entry = self._get_reconfigure_entry()