Improve type hints in fritzbox config flow (#130509)

This commit is contained in:
epenet 2024-11-13 13:01:54 +01:00 committed by GitHub
parent b78453b85b
commit ab11b84678
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,10 +43,11 @@ class FritzboxConfigFlow(ConfigFlow, domain=DOMAIN):
VERSION = 1
_name: str
def __init__(self) -> None:
"""Initialize flow."""
self._host: str | None = None
self._name: str | None = None
self._password: str | None = None
self._username: str | None = None
@ -158,7 +159,6 @@ class FritzboxConfigFlow(ConfigFlow, domain=DOMAIN):
result = await self.async_try_connect()
if result == RESULT_SUCCESS:
assert self._name is not None
return self._get_entry(self._name)
if result != RESULT_INVALID_AUTH:
return self.async_abort(reason=result)