From 8c1a8b502d319d2f8f3452db0215116c9ec2f481 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 9 Dec 2019 09:36:42 +0100 Subject: [PATCH] Sort imports according to PEP8 for velbus (#29676) --- homeassistant/components/velbus/__init__.py | 5 +++-- homeassistant/components/velbus/binary_sensor.py | 2 +- homeassistant/components/velbus/climate.py | 2 +- homeassistant/components/velbus/config_flow.py | 2 +- homeassistant/components/velbus/cover.py | 4 ++-- homeassistant/components/velbus/sensor.py | 2 +- tests/components/velbus/test_config_flow.py | 4 ++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/velbus/__init__.py b/homeassistant/components/velbus/__init__.py index 9946f06446f..317c305254b 100644 --- a/homeassistant/components/velbus/__init__.py +++ b/homeassistant/components/velbus/__init__.py @@ -1,13 +1,14 @@ """Support for Velbus devices.""" import asyncio import logging + import velbus import voluptuous as vol -import homeassistant.helpers.config_validation as cv from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry -from homeassistant.const import CONF_PORT, CONF_NAME +from homeassistant.const import CONF_NAME, CONF_PORT from homeassistant.exceptions import ConfigEntryNotReady +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.helpers.typing import HomeAssistantType diff --git a/homeassistant/components/velbus/binary_sensor.py b/homeassistant/components/velbus/binary_sensor.py index 9230632e442..505303ded24 100644 --- a/homeassistant/components/velbus/binary_sensor.py +++ b/homeassistant/components/velbus/binary_sensor.py @@ -3,8 +3,8 @@ import logging from homeassistant.components.binary_sensor import BinarySensorDevice -from .const import DOMAIN from . import VelbusEntity +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/velbus/climate.py b/homeassistant/components/velbus/climate.py index eb5ed00c395..812e4605d95 100644 --- a/homeassistant/components/velbus/climate.py +++ b/homeassistant/components/velbus/climate.py @@ -10,8 +10,8 @@ from homeassistant.components.climate.const import ( ) from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT -from .const import DOMAIN from . import VelbusEntity +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/velbus/config_flow.py b/homeassistant/components/velbus/config_flow.py index e9cbe14ce25..9325acf0608 100644 --- a/homeassistant/components/velbus/config_flow.py +++ b/homeassistant/components/velbus/config_flow.py @@ -3,7 +3,7 @@ import velbus import voluptuous as vol from homeassistant import config_entries -from homeassistant.const import CONF_PORT, CONF_NAME +from homeassistant.const import CONF_NAME, CONF_PORT from homeassistant.core import HomeAssistant, callback from homeassistant.util import slugify diff --git a/homeassistant/components/velbus/cover.py b/homeassistant/components/velbus/cover.py index cf73af593b8..aea02331ead 100644 --- a/homeassistant/components/velbus/cover.py +++ b/homeassistant/components/velbus/cover.py @@ -4,14 +4,14 @@ import logging from velbus.util import VelbusException from homeassistant.components.cover import ( - CoverDevice, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_STOP, + CoverDevice, ) -from .const import DOMAIN from . import VelbusEntity +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/velbus/sensor.py b/homeassistant/components/velbus/sensor.py index 3b7f2b6f5bc..8af5df9e165 100644 --- a/homeassistant/components/velbus/sensor.py +++ b/homeassistant/components/velbus/sensor.py @@ -1,8 +1,8 @@ """Support for Velbus sensors.""" import logging -from .const import DOMAIN from . import VelbusEntity +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/tests/components/velbus/test_config_flow.py b/tests/components/velbus/test_config_flow.py index 271f0b3dd3a..66273e01f43 100644 --- a/tests/components/velbus/test_config_flow.py +++ b/tests/components/velbus/test_config_flow.py @@ -1,11 +1,11 @@ """Tests for the Velbus config flow.""" -from unittest.mock import patch, Mock +from unittest.mock import Mock, patch import pytest from homeassistant import data_entry_flow from homeassistant.components.velbus import config_flow -from homeassistant.const import CONF_PORT, CONF_NAME +from homeassistant.const import CONF_NAME, CONF_PORT from tests.common import MockConfigEntry