Add type hints to transmission (#99117)

* Add type hints

* Apply suggestions
This commit is contained in:
Rami Mosleh
2023-08-27 13:43:30 +03:00
committed by GitHub
parent 54cd0e8183
commit 2dd6b26fbc
2 changed files with 25 additions and 12 deletions

View File

@@ -57,7 +57,9 @@ class TransmissionFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler."""
return TransmissionOptionsFlowHandler(config_entry)
async def async_step_user(self, user_input=None):
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle a flow initialized by the user."""
errors = {}
@@ -141,7 +143,9 @@ class TransmissionOptionsFlowHandler(config_entries.OptionsFlow):
"""Initialize Transmission options flow."""
self.config_entry = config_entry
async def async_step_init(self, user_input=None):
async def async_step_init(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Manage the Transmission options."""
if user_input is not None:
return self.async_create_entry(title="", data=user_input)