Fix typing in glances config flow (#76654)

fix typing in config_flow
This commit is contained in:
Rami Mosleh 2022-08-12 12:42:42 +03:00 committed by GitHub
parent 46369b274b
commit cafc6ca895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,9 +17,9 @@ from homeassistant.const import (
CONF_VERIFY_SSL, CONF_VERIFY_SSL,
) )
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult
from . import get_api from . import get_api
from ...data_entry_flow import FlowResult
from .const import ( from .const import (
CONF_VERSION, CONF_VERSION,
DEFAULT_HOST, DEFAULT_HOST,
@ -67,7 +67,9 @@ class GlancesFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler.""" """Get the options flow for this handler."""
return GlancesOptionsFlowHandler(config_entry) return GlancesOptionsFlowHandler(config_entry)
async def async_step_user(self, user_input: dict[str, Any] = None) -> FlowResult: async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the initial step.""" """Handle the initial step."""
errors = {} errors = {}
if user_input is not None: if user_input is not None:
@ -94,7 +96,9 @@ class GlancesOptionsFlowHandler(config_entries.OptionsFlow):
"""Initialize Glances options flow.""" """Initialize Glances options flow."""
self.config_entry = config_entry self.config_entry = config_entry
async def async_step_init(self, user_input: dict[str, Any] = None) -> FlowResult: async def async_step_init(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Manage the Glances options.""" """Manage the Glances options."""
if user_input is not None: if user_input is not None:
return self.async_create_entry(title="", data=user_input) return self.async_create_entry(title="", data=user_input)