Enable strict typing for ambiclimate (#106819)
This commit is contained in:
parent
cc18b9a2d8
commit
d93d25a7d1
4 changed files with 18 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue