Add async_get_options_flow type hints (n-z) (#73431)
This commit is contained in:
parent
b589700651
commit
42ed0fd47b
20 changed files with 106 additions and 35 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Config flow for Risco integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from pyrisco import CannotConnectError, RiscoAPI, UnauthorizedError
|
||||
|
@ -67,7 +69,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
|
||||
@staticmethod
|
||||
@core.callback
|
||||
def async_get_options_flow(config_entry):
|
||||
def async_get_options_flow(
|
||||
config_entry: config_entries.ConfigEntry,
|
||||
) -> RiscoOptionsFlowHandler:
|
||||
"""Define the config flow to handle options."""
|
||||
return RiscoOptionsFlowHandler(config_entry)
|
||||
|
||||
|
@ -98,7 +102,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
class RiscoOptionsFlowHandler(config_entries.OptionsFlow):
|
||||
"""Handle a Risco options flow."""
|
||||
|
||||
def __init__(self, config_entry):
|
||||
def __init__(self, config_entry: config_entries.ConfigEntry) -> None:
|
||||
"""Initialize."""
|
||||
self.config_entry = config_entry
|
||||
self._data = {**DEFAULT_OPTIONS, **config_entry.options}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue