Use Mapping for async_step_reauth in motioneye (#72769)

This commit is contained in:
epenet 2022-06-01 06:58:29 +02:00 committed by GitHub
parent 394442e8a9
commit a6db25219d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
"""Config flow for motionEye integration."""
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, cast
from motioneye_client.client import (
@ -158,10 +159,10 @@ class MotionEyeConfigFlow(ConfigFlow, domain=DOMAIN):
async def async_step_reauth(
self,
config_data: dict[str, Any] | None = None,
config_data: Mapping[str, Any],
) -> FlowResult:
"""Handle a reauthentication flow."""
return await self.async_step_user(config_data)
return await self.async_step_user()
async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> FlowResult:
"""Handle Supervisor discovery."""

View File

@ -259,6 +259,7 @@ async def test_reauth(hass: HomeAssistant) -> None:
"source": config_entries.SOURCE_REAUTH,
"entry_id": config_entry.entry_id,
},
data=config_entry.data,
)
assert result["type"] == "form"
assert not result["errors"]