Sort imports according to PEP8 for pi_hole (#29726)

This commit is contained in:
Bas Nijholt 2019-12-09 09:38:14 +01:00 committed by Franck Nijhof
parent 942f654d92
commit 236a21c76e
3 changed files with 9 additions and 7 deletions

View File

@ -1,31 +1,31 @@
"""The pi_hole component.""" """The pi_hole component."""
import logging import logging
import voluptuous as vol
from hole import Hole from hole import Hole
from hole.exceptions import HoleError from hole.exceptions import HoleError
import voluptuous as vol
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.const import ( from homeassistant.const import (
CONF_API_KEY,
CONF_HOST, CONF_HOST,
CONF_NAME, CONF_NAME,
CONF_API_KEY,
CONF_SSL, CONF_SSL,
CONF_VERIFY_SSL, CONF_VERIFY_SSL,
) )
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.helpers import config_validation as cv from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.discovery import async_load_platform from homeassistant.helpers.discovery import async_load_platform
from homeassistant.util import Throttle from homeassistant.util import Throttle
from .const import ( from .const import (
DOMAIN,
CONF_LOCATION, CONF_LOCATION,
DEFAULT_HOST, DEFAULT_HOST,
DEFAULT_LOCATION, DEFAULT_LOCATION,
DEFAULT_NAME, DEFAULT_NAME,
DEFAULT_SSL, DEFAULT_SSL,
DEFAULT_VERIFY_SSL, DEFAULT_VERIFY_SSL,
DOMAIN,
MIN_TIME_BETWEEN_UPDATES, MIN_TIME_BETWEEN_UPDATES,
SERVICE_DISABLE, SERVICE_DISABLE,
SERVICE_DISABLE_ATTR_DURATION, SERVICE_DISABLE_ATTR_DURATION,

View File

@ -4,10 +4,10 @@ import logging
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from .const import ( from .const import (
DOMAIN as PIHOLE_DOMAIN,
ATTR_BLOCKED_DOMAINS, ATTR_BLOCKED_DOMAINS,
SENSOR_LIST, DOMAIN as PIHOLE_DOMAIN,
SENSOR_DICT, SENSOR_DICT,
SENSOR_LIST,
) )
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)

View File

@ -1,11 +1,13 @@
"""Test pi_hole component.""" """Test pi_hole component."""
from unittest.mock import patch
from asynctest import CoroutineMock from asynctest import CoroutineMock
from hole import Hole from hole import Hole
from homeassistant.components import pi_hole from homeassistant.components import pi_hole
from tests.common import async_setup_component from tests.common import async_setup_component
from unittest.mock import patch
def mock_pihole_data_call(Hole): def mock_pihole_data_call(Hole):