Sort imports according to PEP8 for 'homeassistant' folder (#29789)

Components are already done
This commit is contained in:
Bas Nijholt 2019-12-09 16:42:10 +01:00 committed by Franck Nijhof
parent 29ec17d50d
commit 67c56c860d
83 changed files with 290 additions and 329 deletions

View file

@ -1,59 +1,59 @@
"""Module to help with parsing and generating configuration files."""
from collections import OrderedDict
# pylint: disable=no-name-in-module
from collections import OrderedDict
from distutils.version import LooseVersion # pylint: disable=import-error
import logging
import os
import re
import shutil
from typing import Any, Tuple, Optional, Dict, Union, Callable, Sequence, Set
from types import ModuleType
from typing import Any, Callable, Dict, Optional, Sequence, Set, Tuple, Union
import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant import auth
from homeassistant.auth import (
providers as auth_providers,
mfa_modules as auth_mfa_modules,
providers as auth_providers,
)
from homeassistant.const import (
ATTR_ASSUMED_STATE,
ATTR_FRIENDLY_NAME,
ATTR_HIDDEN,
ATTR_ASSUMED_STATE,
CONF_AUTH_MFA_MODULES,
CONF_AUTH_PROVIDERS,
CONF_CUSTOMIZE,
CONF_CUSTOMIZE_DOMAIN,
CONF_CUSTOMIZE_GLOB,
CONF_ELEVATION,
CONF_ID,
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_NAME,
CONF_PACKAGES,
CONF_UNIT_SYSTEM,
CONF_TIME_ZONE,
CONF_ELEVATION,
CONF_UNIT_SYSTEM_IMPERIAL,
CONF_TEMPERATURE_UNIT,
CONF_TIME_ZONE,
CONF_TYPE,
CONF_UNIT_SYSTEM,
CONF_UNIT_SYSTEM_IMPERIAL,
CONF_WHITELIST_EXTERNAL_DIRS,
TEMP_CELSIUS,
__version__,
CONF_CUSTOMIZE,
CONF_CUSTOMIZE_DOMAIN,
CONF_CUSTOMIZE_GLOB,
CONF_WHITELIST_EXTERNAL_DIRS,
CONF_AUTH_PROVIDERS,
CONF_AUTH_MFA_MODULES,
CONF_TYPE,
CONF_ID,
)
from homeassistant.core import DOMAIN as CONF_CORE, SOURCE_YAML, HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import config_per_platform, extract_domain_configs
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_values import EntityValues
from homeassistant.loader import Integration, IntegrationNotFound
from homeassistant.requirements import (
async_get_integration_with_requirements,
RequirementsNotFound,
async_get_integration_with_requirements,
)
from homeassistant.util.yaml import load_yaml, SECRET_YAML
from homeassistant.util.package import is_docker_env
import homeassistant.helpers.config_validation as cv
from homeassistant.util.unit_system import IMPERIAL_SYSTEM, METRIC_SYSTEM
from homeassistant.helpers.entity_values import EntityValues
from homeassistant.helpers import config_per_platform, extract_domain_configs
from homeassistant.util.yaml import SECRET_YAML, load_yaml
_LOGGER = logging.getLogger(__name__)