Improve config flow type hints (g-m) (#124907)

This commit is contained in:
epenet 2024-08-30 11:05:18 +02:00 committed by GitHub
parent 6833af6286
commit 74fa30e59d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 61 additions and 24 deletions

View file

@ -43,7 +43,9 @@ class MillConfigFlow(ConfigFlow, domain=DOMAIN):
return await self.async_step_local()
return await self.async_step_cloud()
async def async_step_local(self, user_input=None):
async def async_step_local(
self, user_input: dict[str, str] | None = None
) -> ConfigFlowResult:
"""Handle the local step."""
data_schema = vol.Schema({vol.Required(CONF_IP_ADDRESS): str})
if user_input is None:
@ -75,7 +77,9 @@ class MillConfigFlow(ConfigFlow, domain=DOMAIN):
},
)
async def async_step_cloud(self, user_input=None):
async def async_step_cloud(
self, user_input: dict[str, str] | None = None
) -> ConfigFlowResult:
"""Handle the cloud step."""
data_schema = vol.Schema(
{vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str}