Make FlowResult a generic type (#111952)

This commit is contained in:
Erik Montnemery
2024-03-07 12:41:14 +01:00
committed by GitHub
parent 008e025d5c
commit 82efb3d35b
13 changed files with 95 additions and 80 deletions

View File

@@ -8,10 +8,9 @@ from typing import Any, cast
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from ..models import Credentials, UserMeta
from ..models import AuthFlowResult, Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
USER_SCHEMA = vol.Schema(
@@ -98,7 +97,7 @@ class ExampleLoginFlow(LoginFlow):
async def async_step_init(
self, user_input: dict[str, str] | None = None
) -> FlowResult:
) -> AuthFlowResult:
"""Handle the step of the form."""
errors = None