8000 Adjust config-flow reauth type hints in components by epenet · Pull Request #74088 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adjust config-flow reauth type hints in components #74088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions homeassistant/components/google/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Config flow for Google integration."""
from __future__ import annotations

from collections.abc import Mapping
import logging
from typing import Any

Expand Down Expand Up @@ -155,9 +156,7 @@ async def async_oauth_create_entry(self, data: dict) -> FlowResult:
},
)

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"]
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/neato/config_flow.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -35,7 +35,7 @@ async def async_step_user(

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()

Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/netatmo/config_flow.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -66,7 +68,7 @@ async def async_step_user(self, user_input: dict | None = None) -> FlowResult:

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()

Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/spotify/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Config flow for Spotify."""
from __future__ import annotations

from collections.abc import Mapping
import logging
from typing import Any

Expand Down Expand Up @@ -56,7 +57,7 @@ async def async_oauth_create_entry(self, data: dict[str, Any]) -> FlowResult:

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"]
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/yolink/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Config flow for yolink."""
from __future__ import annotations

from collections.abc import Mapping
import logging
from typing import Any

Expand Down Expand Up @@ -30,7 +31,7 @@ def extra_authorize_data(self) -> dict:
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"]
Expand Down
0