1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00

Fixed typing errors (#22207)

This commit is contained in:
Penny Wood 2019-03-20 22:49:27 +08:00 committed by Paulus Schoutsen
parent 398281959a
commit 62c2bbd59a

View File

@ -5,7 +5,7 @@ import os
import sys
from time import time
from collections import OrderedDict
from typing import Any, Optional, Dict
from typing import Any, Optional, Dict, Set
import voluptuous as vol
@ -391,14 +391,15 @@ async def async_mount_local_lib_path(config_dir: str) -> str:
@core.callback
def _get_components(hass: core.HomeAssistant, config: Dict[str, Any]):
def _get_components(hass: core.HomeAssistant,
config: Dict[str, Any]) -> Set[str]:
"""Get components to set up."""
# Filter out the repeating and common config section [homeassistant]
components = set(key.split(' ')[0] for key in config.keys()
if key != core.DOMAIN)
# Add config entry domains
components.update(hass.config_entries.async_domains())
components.update(hass.config_entries.async_domains()) # type: ignore
# Make sure the Hass.io component is loaded
if 'HASSIO' in os.environ: