use isort to sort imports according to PEP8 for config (#29628)
This commit is contained in:
parent
73c373a0f2
commit
f355570f17
19 changed files with 25 additions and 26 deletions
|
@ -6,11 +6,11 @@ import os
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.const import EVENT_COMPONENT_LOADED, CONF_ID
|
||||
from homeassistant.const import CONF_ID, EVENT_COMPONENT_LOADED
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.setup import ATTR_COMPONENT
|
||||
from homeassistant.util.yaml import load_yaml, dump
|
||||
from homeassistant.util.yaml import dump, load_yaml
|
||||
|
||||
DOMAIN = "config"
|
||||
SECTIONS = (
|
||||
|
|
|
@ -9,7 +9,6 @@ from homeassistant.components.websocket_api.decorators import (
|
|||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.area_registry import async_get_registry
|
||||
|
||||
|
||||
WS_TYPE_LIST = "config/area_registry/list"
|
||||
SCHEMA_WS_LIST = websocket_api.BASE_COMMAND_MESSAGE_SCHEMA.extend(
|
||||
{vol.Required("type"): WS_TYPE_LIST}
|
||||
|
|
|
@ -3,7 +3,6 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components import websocket_api
|
||||
|
||||
|
||||
WS_TYPE_LIST = "config/auth/list"
|
||||
SCHEMA_WS_LIST = websocket_api.BASE_COMMAND_MESSAGE_SCHEMA.extend(
|
||||
{vol.Required("type"): WS_TYPE_LIST}
|
||||
|
|
|
@ -4,7 +4,6 @@ import voluptuous as vol
|
|||
from homeassistant.auth.providers import homeassistant as auth_ha
|
||||
from homeassistant.components import websocket_api
|
||||
|
||||
|
||||
WS_TYPE_CREATE = "config/auth_provider/homeassistant/create"
|
||||
SCHEMA_WS_CREATE = websocket_api.BASE_COMMAND_MESSAGE_SCHEMA.extend(
|
||||
{
|
||||
|
|
|
@ -4,8 +4,8 @@ import uuid
|
|||
|
||||
from homeassistant.components.automation import DOMAIN, PLATFORM_SCHEMA
|
||||
from homeassistant.components.automation.config import async_validate_config_item
|
||||
from homeassistant.const import CONF_ID, SERVICE_RELOAD
|
||||
from homeassistant.config import AUTOMATION_CONFIG_PATH
|
||||
from homeassistant.const import CONF_ID, SERVICE_RELOAD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from . import EditIdBasedConfigView
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.config import async_check_ha_config_file
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.const import CONF_UNIT_SYSTEM_METRIC, CONF_UNIT_SYSTEM_IMPERIAL
|
||||
from homeassistant.const import CONF_UNIT_SYSTEM_IMPERIAL, CONF_UNIT_SYSTEM_METRIC
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.util import location
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
"""HTTP views to interact with the entity registry."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity_registry import async_get_registry
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.components.websocket_api.const import ERR_NOT_FOUND
|
||||
from homeassistant.components.websocket_api.decorators import (
|
||||
async_response,
|
||||
require_admin,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.entity_registry import async_get_registry
|
||||
|
||||
|
||||
async def async_setup(hass):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""Provide configuration end points for Groups."""
|
||||
from homeassistant.components.group import DOMAIN, GROUP_SCHEMA
|
||||
from homeassistant.const import SERVICE_RELOAD
|
||||
from homeassistant.config import GROUP_CONFIG_PATH
|
||||
from homeassistant.const import SERVICE_RELOAD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from . import EditKeyBasedConfigView
|
||||
|
|
|
@ -3,8 +3,8 @@ from collections import OrderedDict
|
|||
import uuid
|
||||
|
||||
from homeassistant.components.scene import DOMAIN, PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_ID, SERVICE_RELOAD
|
||||
from homeassistant.config import SCENE_CONFIG_PATH
|
||||
from homeassistant.const import CONF_ID, SERVICE_RELOAD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from . import EditIdBasedConfigView
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""Provide configuration end points for scripts."""
|
||||
from homeassistant.components.script import DOMAIN, SCRIPT_ENTRY_SCHEMA
|
||||
from homeassistant.const import SERVICE_RELOAD
|
||||
from homeassistant.config import SCRIPT_CONFIG_PATH
|
||||
from homeassistant.const import SERVICE_RELOAD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from . import EditKeyBasedConfigView
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import pytest
|
||||
|
||||
from homeassistant.components.config import area_registry
|
||||
|
||||
from tests.common import mock_area_registry
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import pytest
|
|||
from homeassistant.auth import models as auth_models
|
||||
from homeassistant.components.config import auth as auth_config
|
||||
|
||||
from tests.common import MockGroup, MockUser, CLIENT_ID
|
||||
from tests.common import CLIENT_ID, MockGroup, MockUser
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
|
@ -8,18 +8,18 @@ import pytest
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries as core_ce, data_entry_flow
|
||||
from homeassistant.components.config import config_entries
|
||||
from homeassistant.config_entries import HANDLERS
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components.config import config_entries
|
||||
from homeassistant.generated import config_flows
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
MockModule,
|
||||
mock_coro_func,
|
||||
mock_integration,
|
||||
mock_entity_platform,
|
||||
mock_integration,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ from homeassistant.components import config
|
|||
from homeassistant.components.websocket_api.const import TYPE_RESULT
|
||||
from homeassistant.const import CONF_UNIT_SYSTEM, CONF_UNIT_SYSTEM_IMPERIAL
|
||||
from homeassistant.util import dt as dt_util, location
|
||||
|
||||
from tests.common import mock_coro
|
||||
|
||||
ORIG_TIME_ZONE = dt_util.DEFAULT_TIME_ZONE
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import pytest
|
||||
|
||||
from homeassistant.components.config import device_registry
|
||||
|
||||
from tests.common import mock_device_registry
|
||||
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@ from collections import OrderedDict
|
|||
|
||||
import pytest
|
||||
|
||||
from homeassistant.helpers.entity_registry import RegistryEntry
|
||||
from homeassistant.components.config import entity_registry
|
||||
from tests.common import mock_registry, MockEntity, MockEntityPlatform
|
||||
from homeassistant.helpers.entity_registry import RegistryEntry
|
||||
|
||||
from tests.common import MockEntity, MockEntityPlatform, mock_registry
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
"""Test Group config panel."""
|
||||
import asyncio
|
||||
import json
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from homeassistant.bootstrap import async_setup_component
|
||||
from homeassistant.components import config
|
||||
|
||||
|
||||
VIEW_NAME = "api:config:group:config"
|
||||
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
import asyncio
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant.const import EVENT_COMPONENT_LOADED
|
||||
from homeassistant.setup import async_setup_component, ATTR_COMPONENT
|
||||
from homeassistant.components import config
|
||||
from homeassistant.const import EVENT_COMPONENT_LOADED
|
||||
from homeassistant.setup import ATTR_COMPONENT, async_setup_component
|
||||
|
||||
from tests.common import mock_coro, mock_component
|
||||
from tests.common import mock_component, mock_coro
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
|
|
|
@ -7,10 +7,9 @@ import pytest
|
|||
|
||||
from homeassistant.bootstrap import async_setup_component
|
||||
from homeassistant.components import config
|
||||
|
||||
from homeassistant.components.zwave import DATA_NETWORK, const
|
||||
from tests.mock.zwave import MockNode, MockValue, MockEntityValues
|
||||
|
||||
from tests.mock.zwave import MockEntityValues, MockNode, MockValue
|
||||
|
||||
VIEW_NAME = "api:config:zwave:device_config"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue