Fixed typing errors (#22207)

This commit is contained in:
Penny Wood 2019-03-20 22:49:27 +08:00 committed by Paulus Schoutsen
parent 1bf49ce5a3
commit d4cd39e43e

View File

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