Adjust config-flow reauth type hints in components (#74088)
parent
530e1f9080
commit
b6676df1cb
|
@ -1,6 +1,7 @@
|
|||
"""Config flow for Google integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
|
@ -155,9 +156,7 @@ class OAuth2FlowHandler(
|
|||
},
|
||||
)
|
||||
|
||||
async def async_step_reauth(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> FlowResult:
|
||||
async def async_step_reauth(self, user_input: Mapping[str, Any]) -> FlowResult:
|
||||
"""Perform reauth upon an API authentication error."""
|
||||
self._reauth_config_entry = self.hass.config_entries.async_get_entry(
|
||||
self.context["entry_id"]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""Config flow for Neato Botvac."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
import logging
|
||||
from types import MappingProxyType
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.config_entries import SOURCE_REAUTH
|
||||
|
@ -35,7 +35,7 @@ class OAuth2FlowHandler(
|
|||
|
||||
return await super().async_step_user(user_input=user_input)
|
||||
|
||||
async def async_step_reauth(self, data: MappingProxyType[str, Any]) -> FlowResult:
|
||||
async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult:
|
||||
"""Perform reauth upon migration of old entries."""
|
||||
return await self.async_step_reauth_confirm()
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
"""Config flow for Netatmo."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
import logging
|
||||
from typing import Any
|
||||
import uuid
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -66,7 +68,7 @@ class NetatmoFlowHandler(
|
|||
|
||||
return await super().async_step_user(user_input)
|
||||
|
||||
async def async_step_reauth(self, user_input: dict | None = None) -> FlowResult:
|
||||
async def async_step_reauth(self, user_input: Mapping[str, Any]) -> FlowResult:
|
||||
"""Perform reauth upon an API authentication error."""
|
||||
return await self.async_step_reauth_confirm()
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""Config flow for Spotify."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
|
@ -56,7 +57,7 @@ class SpotifyFlowHandler(
|
|||
|
||||
return self.async_create_entry(title=name, data=data)
|
||||
|
||||
async def async_step_reauth(self, entry: dict[str, Any]) -> FlowResult:
|
||||
async def async_step_reauth(self, entry: Mapping[str, Any]) -> FlowResult:
|
||||
"""Perform reauth upon migration of old entries."""
|
||||
self.reauth_entry = self.hass.config_entries.async_get_entry(
|
||||
self.context["entry_id"]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""Config flow for yolink."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
|
@ -30,7 +31,7 @@ class OAuth2FlowHandler(
|
|||
scopes = ["create"]
|
||||
return {"scope": " ".join(scopes)}
|
||||
|
||||
async def async_step_reauth(self, user_input=None) -> FlowResult:
|
||||
async def async_step_reauth(self, user_input: Mapping[str, Any]) -> FlowResult:
|
||||
"""Perform reauth upon an API authentication error."""
|
||||
self._reauth_entry = self.hass.config_entries.async_get_entry(
|
||||
self.context["entry_id"]
|
||||
|
|
Loading…
Reference in New Issue