use isort to sort imports according to PEP8 for zone (#29712)
This commit is contained in:
parent
2abc9005cc
commit
1790036767
4 changed files with 14 additions and 17 deletions
|
@ -4,29 +4,28 @@ from typing import Set, cast
|
|||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import callback, State
|
||||
from homeassistant.loader import bind_hass
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
CONF_ICON,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_ICON,
|
||||
CONF_NAME,
|
||||
CONF_RADIUS,
|
||||
EVENT_CORE_CONFIG_UPDATE,
|
||||
)
|
||||
from homeassistant.core import State, callback
|
||||
from homeassistant.helpers import config_per_platform
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import async_generate_entity_id
|
||||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.util import slugify
|
||||
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
|
||||
from homeassistant.util.location import distance
|
||||
|
||||
|
||||
from .config_flow import configured_zones
|
||||
from .const import CONF_PASSIVE, DOMAIN, HOME_ZONE, ATTR_PASSIVE, ATTR_RADIUS
|
||||
from .const import ATTR_PASSIVE, ATTR_RADIUS, CONF_PASSIVE, DOMAIN, HOME_ZONE
|
||||
from .zone import Zone
|
||||
|
||||
|
||||
# mypy: allow-untyped-calls, allow-untyped-defs
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -4,22 +4,21 @@ from typing import Set
|
|||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
CONF_ICON,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_ICON,
|
||||
CONF_NAME,
|
||||
CONF_RADIUS,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
from homeassistant.util import slugify
|
||||
|
||||
from .const import CONF_PASSIVE, DOMAIN, HOME_ZONE
|
||||
|
||||
|
||||
# mypy: allow-untyped-defs, no-check-untyped-defs
|
||||
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
from homeassistant.components.zone import config_flow
|
||||
from homeassistant.components.zone.const import CONF_PASSIVE, DOMAIN, HOME_ZONE
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
CONF_ICON,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_ICON,
|
||||
CONF_NAME,
|
||||
CONF_RADIUS,
|
||||
)
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ from unittest.mock import Mock
|
|||
from homeassistant import setup
|
||||
from homeassistant.components import zone
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
from tests.common import MockConfigEntry
|
||||
from tests.common import MockConfigEntry, get_test_home_assistant
|
||||
|
||||
|
||||
async def test_setup_entry_successful(hass):
|
||||
|
|
Loading…
Add table
Reference in a new issue