mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
use isort to sort imports according to PEP8 for homeassistant (#29718)
This commit is contained in:
parent
236a21c76e
commit
2abc9005cc
@ -6,23 +6,22 @@ from typing import Awaitable
|
|||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.core as ha
|
|
||||||
import homeassistant.config as conf_util
|
import homeassistant.config as conf_util
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
|
||||||
from homeassistant.helpers.service import async_extract_entity_ids
|
|
||||||
from homeassistant.helpers import intent
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
SERVICE_TURN_ON,
|
|
||||||
SERVICE_TURN_OFF,
|
|
||||||
SERVICE_TOGGLE,
|
|
||||||
SERVICE_HOMEASSISTANT_STOP,
|
|
||||||
SERVICE_HOMEASSISTANT_RESTART,
|
|
||||||
RESTART_EXIT_CODE,
|
|
||||||
ATTR_LATITUDE,
|
ATTR_LATITUDE,
|
||||||
ATTR_LONGITUDE,
|
ATTR_LONGITUDE,
|
||||||
|
RESTART_EXIT_CODE,
|
||||||
|
SERVICE_HOMEASSISTANT_RESTART,
|
||||||
|
SERVICE_HOMEASSISTANT_STOP,
|
||||||
|
SERVICE_TOGGLE,
|
||||||
|
SERVICE_TURN_OFF,
|
||||||
|
SERVICE_TURN_ON,
|
||||||
)
|
)
|
||||||
from homeassistant.helpers import config_validation as cv
|
import homeassistant.core as ha
|
||||||
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
|
from homeassistant.helpers import config_validation as cv, intent
|
||||||
|
from homeassistant.helpers.service import async_extract_entity_ids
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
DOMAIN = ha.DOMAIN
|
DOMAIN = ha.DOMAIN
|
||||||
|
@ -4,6 +4,8 @@ import logging
|
|||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from homeassistant import config as conf_util
|
||||||
|
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN, STATES, Scene
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
ATTR_STATE,
|
ATTR_STATE,
|
||||||
@ -11,21 +13,19 @@ from homeassistant.const import (
|
|||||||
CONF_ID,
|
CONF_ID,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
CONF_PLATFORM,
|
CONF_PLATFORM,
|
||||||
|
SERVICE_RELOAD,
|
||||||
STATE_OFF,
|
STATE_OFF,
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
SERVICE_RELOAD,
|
|
||||||
)
|
)
|
||||||
from homeassistant.core import State, DOMAIN as HA_DOMAIN
|
from homeassistant.core import DOMAIN as HA_DOMAIN, State
|
||||||
from homeassistant import config as conf_util
|
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.loader import async_get_integration
|
|
||||||
from homeassistant.helpers import (
|
from homeassistant.helpers import (
|
||||||
config_per_platform,
|
config_per_platform,
|
||||||
config_validation as cv,
|
config_validation as cv,
|
||||||
entity_platform,
|
entity_platform,
|
||||||
)
|
)
|
||||||
from homeassistant.helpers.state import async_reproduce_state
|
from homeassistant.helpers.state import async_reproduce_state
|
||||||
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN, STATES, Scene
|
from homeassistant.loader import async_get_integration
|
||||||
|
|
||||||
|
|
||||||
def _convert_states(states):
|
def _convert_states(states):
|
||||||
|
@ -2,40 +2,40 @@
|
|||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
import asyncio
|
import asyncio
|
||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import patch, Mock
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
import homeassistant.core as ha
|
|
||||||
from homeassistant import config
|
from homeassistant import config
|
||||||
from homeassistant.const import (
|
|
||||||
ATTR_ENTITY_ID,
|
|
||||||
STATE_ON,
|
|
||||||
STATE_OFF,
|
|
||||||
SERVICE_HOMEASSISTANT_RESTART,
|
|
||||||
SERVICE_HOMEASSISTANT_STOP,
|
|
||||||
SERVICE_TURN_ON,
|
|
||||||
SERVICE_TURN_OFF,
|
|
||||||
SERVICE_TOGGLE,
|
|
||||||
EVENT_CORE_CONFIG_UPDATE,
|
|
||||||
)
|
|
||||||
import homeassistant.components as comps
|
import homeassistant.components as comps
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
from homeassistant.components.homeassistant import (
|
from homeassistant.components.homeassistant import (
|
||||||
SERVICE_CHECK_CONFIG,
|
SERVICE_CHECK_CONFIG,
|
||||||
SERVICE_RELOAD_CORE_CONFIG,
|
SERVICE_RELOAD_CORE_CONFIG,
|
||||||
)
|
)
|
||||||
import homeassistant.helpers.intent as intent
|
from homeassistant.const import (
|
||||||
|
ATTR_ENTITY_ID,
|
||||||
|
EVENT_CORE_CONFIG_UPDATE,
|
||||||
|
SERVICE_HOMEASSISTANT_RESTART,
|
||||||
|
SERVICE_HOMEASSISTANT_STOP,
|
||||||
|
SERVICE_TOGGLE,
|
||||||
|
SERVICE_TURN_OFF,
|
||||||
|
SERVICE_TURN_ON,
|
||||||
|
STATE_OFF,
|
||||||
|
STATE_ON,
|
||||||
|
)
|
||||||
|
import homeassistant.core as ha
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers import entity
|
from homeassistant.helpers import entity
|
||||||
|
import homeassistant.helpers.intent as intent
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
|
async_capture_events,
|
||||||
|
async_mock_service,
|
||||||
get_test_home_assistant,
|
get_test_home_assistant,
|
||||||
|
mock_coro,
|
||||||
mock_service,
|
mock_service,
|
||||||
patch_yaml_files,
|
patch_yaml_files,
|
||||||
mock_coro,
|
|
||||||
async_mock_service,
|
|
||||||
async_capture_events,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user