Improve config flow type hints in tellduslive (#125299)
This commit is contained in:
parent
86ef7bab28
commit
3a5309e9a0
1 changed files with 10 additions and 4 deletions
|
@ -35,14 +35,15 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
|
||||
VERSION = 1
|
||||
|
||||
_session: Session
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Init config flow."""
|
||||
self._hosts = [CLOUD_NAME]
|
||||
self._host = None
|
||||
self._session = None
|
||||
self._scan_interval = SCAN_INTERVAL
|
||||
|
||||
def _get_auth_url(self):
|
||||
def _get_auth_url(self) -> str | None:
|
||||
self._session = Session(
|
||||
public_key=PUBLIC_KEY,
|
||||
private_key=NOT_SO_PRIVATE_KEY,
|
||||
|
@ -70,7 +71,9 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
),
|
||||
)
|
||||
|
||||
async def async_step_auth(self, user_input=None):
|
||||
async def async_step_auth(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle the submitted configuration."""
|
||||
errors = {}
|
||||
if user_input is not None:
|
||||
|
@ -114,7 +117,10 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
},
|
||||
)
|
||||
|
||||
async def async_step_discovery(self, discovery_info):
|
||||
async def async_step_discovery(
|
||||
self,
|
||||
discovery_info: list[str], # type: ignore[override]
|
||||
) -> ConfigFlowResult:
|
||||
"""Run when a Tellstick is discovered."""
|
||||
await self._async_handle_discovery_without_unique_id()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue