mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +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 homeassistant.core as ha
|
||||
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 (
|
||||
ATTR_ENTITY_ID,
|
||||
SERVICE_TURN_ON,
|
||||
SERVICE_TURN_OFF,
|
||||
SERVICE_TOGGLE,
|
||||
SERVICE_HOMEASSISTANT_STOP,
|
||||
SERVICE_HOMEASSISTANT_RESTART,
|
||||
RESTART_EXIT_CODE,
|
||||
ATTR_LATITUDE,
|
||||
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__)
|
||||
DOMAIN = ha.DOMAIN
|
||||
|
@ -4,6 +4,8 @@ import logging
|
||||
|
||||
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 (
|
||||
ATTR_ENTITY_ID,
|
||||
ATTR_STATE,
|
||||
@ -11,21 +13,19 @@ from homeassistant.const import (
|
||||
CONF_ID,
|
||||
CONF_NAME,
|
||||
CONF_PLATFORM,
|
||||
SERVICE_RELOAD,
|
||||
STATE_OFF,
|
||||
STATE_ON,
|
||||
SERVICE_RELOAD,
|
||||
)
|
||||
from homeassistant.core import State, DOMAIN as HA_DOMAIN
|
||||
from homeassistant import config as conf_util
|
||||
from homeassistant.core import DOMAIN as HA_DOMAIN, State
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.loader import async_get_integration
|
||||
from homeassistant.helpers import (
|
||||
config_per_platform,
|
||||
config_validation as cv,
|
||||
entity_platform,
|
||||
)
|
||||
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):
|
||||
|
@ -2,40 +2,40 @@
|
||||
# pylint: disable=protected-access
|
||||
import asyncio
|
||||
import unittest
|
||||
from unittest.mock import patch, Mock
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import yaml
|
||||
|
||||
import homeassistant.core as ha
|
||||
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
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components.homeassistant import (
|
||||
SERVICE_CHECK_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.helpers import entity
|
||||
import homeassistant.helpers.intent as intent
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import (
|
||||
async_capture_events,
|
||||
async_mock_service,
|
||||
get_test_home_assistant,
|
||||
mock_coro,
|
||||
mock_service,
|
||||
patch_yaml_files,
|
||||
mock_coro,
|
||||
async_mock_service,
|
||||
async_capture_events,
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user