Skip to content

Commit

Permalink
Add async_get_options_flow type hints (cast) (home-assistant#73432)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Jun 13, 2022
1 parent c195d46 commit b84e844
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions homeassistant/components/cast/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""Config flow for Cast."""
from __future__ import annotations

from typing import Any

import voluptuous as vol

from homeassistant import config_entries
from homeassistant.components import zeroconf
from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import config_validation as cv

Expand All @@ -25,7 +30,10 @@ def __init__(self):
self._wanted_uuid = set()

@staticmethod
def async_get_options_flow(config_entry):
@callback
def async_get_options_flow(
config_entry: config_entries.ConfigEntry,
) -> CastOptionsFlowHandler:
"""Get the options flow for this handler."""
return CastOptionsFlowHandler(config_entry)

Expand Down Expand Up @@ -110,10 +118,10 @@ def _get_data(self):
class CastOptionsFlowHandler(config_entries.OptionsFlow):
"""Handle Google Cast options."""

def __init__(self, config_entry):
def __init__(self, config_entry: config_entries.ConfigEntry) -> None:
"""Initialize Google Cast options flow."""
self.config_entry = config_entry
self.updated_config = {}
self.updated_config: dict[str, Any] = {}

async def async_step_init(self, user_input=None):
"""Manage the Google Cast options."""
Expand Down

0 comments on commit b84e844

Please sign in to comment.