Make config flow imports consistent (#114962)

* Make config flow imports consistent

* Fix
This commit is contained in:
Joost Lekkerkerker 2024-04-05 21:38:11 +02:00 committed by GitHub
parent aeaed83578
commit 0214511b38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 67 additions and 75 deletions

View file

@ -7,7 +7,7 @@ from typing import Any
import lupupy
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.const import (
CONF_HOST,
CONF_IP_ADDRESS,
@ -31,12 +31,12 @@ DATA_SCHEMA = vol.Schema(
)
class LupusecConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
class LupusecConfigFlowHandler(ConfigFlow, domain=DOMAIN):
"""Lupusec config flow."""
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> config_entries.ConfigFlowResult:
) -> ConfigFlowResult:
"""Handle a flow initiated by the user."""
errors = {}
@ -66,9 +66,7 @@ class LupusecConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
step_id="user", data_schema=DATA_SCHEMA, errors=errors
)
async def async_step_import(
self, user_input: dict[str, Any]
) -> config_entries.ConfigFlowResult:
async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult:
"""Import the yaml config."""
self._async_abort_entries_match(
{