Enable strict typing for ambiclimate (#106819)

This commit is contained in:
Marc Mueller 2024-01-02 05:09:22 +01:00 committed by GitHub
parent cc18b9a2d8
commit d93d25a7d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 6 deletions

View file

@ -114,7 +114,7 @@ class AmbiclimateFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
store = Store[dict[str, Any]](self.hass, STORAGE_VERSION, STORAGE_KEY)
await store.async_save(token_info)
return token_info
return token_info # type: ignore[no-any-return]
def _generate_view(self) -> None:
self.hass.http.register_view(AmbiclimateAuthCallbackView())
@ -132,12 +132,12 @@ class AmbiclimateFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
clientsession,
)
def _cb_url(self):
def _cb_url(self) -> str:
return f"{get_url(self.hass, prefer_external=True)}{AUTH_CALLBACK_PATH}"
async def _get_authorize_url(self):
async def _get_authorize_url(self) -> str:
oauth = self._generate_oauth()
return oauth.get_authorize_url()
return oauth.get_authorize_url() # type: ignore[no-any-return]
class AmbiclimateAuthCallbackView(HomeAssistantView):