Sort imports according to PEP8 for components starting with "B" (#29762)
This commit is contained in:
parent
df74272ba6
commit
73de69896b
23 changed files with 59 additions and 61 deletions
|
@ -4,8 +4,8 @@ import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import bbb_gpio
|
from homeassistant.components import bbb_gpio
|
||||||
from homeassistant.components.binary_sensor import BinarySensorDevice, PLATFORM_SCHEMA
|
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
||||||
from homeassistant.const import DEVICE_DEFAULT_NAME, CONF_NAME
|
from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -3,11 +3,11 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.switch import PLATFORM_SCHEMA
|
|
||||||
from homeassistant.components import bbb_gpio
|
from homeassistant.components import bbb_gpio
|
||||||
from homeassistant.const import DEVICE_DEFAULT_NAME, CONF_NAME
|
from homeassistant.components.switch import PLATFORM_SCHEMA
|
||||||
from homeassistant.helpers.entity import ToggleEntity
|
from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import logging
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import pybbox
|
import pybbox
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.device_tracker import (
|
from homeassistant.components.device_tracker import (
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
"""Support for Bbox Bouygues Modem Router."""
|
"""Support for Bbox Bouygues Modem Router."""
|
||||||
import logging
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
|
||||||
import requests
|
|
||||||
import pybbox
|
import pybbox
|
||||||
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
|
||||||
CONF_MONITORED_VARIABLES,
|
|
||||||
ATTR_ATTRIBUTION,
|
ATTR_ATTRIBUTION,
|
||||||
|
CONF_MONITORED_VARIABLES,
|
||||||
|
CONF_NAME,
|
||||||
DEVICE_CLASS_TIMESTAMP,
|
DEVICE_CLASS_TIMESTAMP,
|
||||||
)
|
)
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
from homeassistant.util.dt import utcnow
|
from homeassistant.util.dt import utcnow
|
||||||
|
|
|
@ -5,15 +5,15 @@ from beewi_smartclim import BeewiSmartClimPoller
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
|
||||||
CONF_MAC,
|
CONF_MAC,
|
||||||
TEMP_CELSIUS,
|
CONF_NAME,
|
||||||
|
DEVICE_CLASS_BATTERY,
|
||||||
DEVICE_CLASS_HUMIDITY,
|
DEVICE_CLASS_HUMIDITY,
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
DEVICE_CLASS_TEMPERATURE,
|
||||||
DEVICE_CLASS_BATTERY,
|
TEMP_CELSIUS,
|
||||||
)
|
)
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import smbus # pylint: disable=import-error
|
|
||||||
from i2csense.bh1750 import BH1750 # pylint: disable=import-error
|
from i2csense.bh1750 import BH1750 # pylint: disable=import-error
|
||||||
|
import smbus # pylint: disable=import-error
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.const import CONF_NAME, DEVICE_CLASS_ILLUMINANCE
|
from homeassistant.const import CONF_NAME, DEVICE_CLASS_ILLUMINANCE
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -2,15 +2,14 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
|
||||||
from bizkaibus.bizkaibus import BizkaibusData
|
from bizkaibus.bizkaibus import BizkaibusData
|
||||||
import homeassistant.helpers.config_validation as cv
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_NAME
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
from homeassistant.const import CONF_NAME
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
ATTR_DUE_IN = "Due in"
|
ATTR_DUE_IN = "Due in"
|
||||||
|
|
|
@ -22,6 +22,7 @@ from homeassistant.const import (
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
)
|
)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
from .const import DOMAIN, SERVICE_SETALLZONES
|
from .const import DOMAIN, SERVICE_SETALLZONES
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -4,16 +4,16 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
SUPPORT_BRIGHTNESS,
|
|
||||||
ATTR_HS_COLOR,
|
ATTR_HS_COLOR,
|
||||||
|
PLATFORM_SCHEMA,
|
||||||
|
SUPPORT_BRIGHTNESS,
|
||||||
SUPPORT_COLOR,
|
SUPPORT_COLOR,
|
||||||
Light,
|
Light,
|
||||||
PLATFORM_SCHEMA,
|
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_NAME
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
import homeassistant.util.color as color_util
|
import homeassistant.util.color as color_util
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -3,7 +3,7 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import BinarySensorDevice, PLATFORM_SCHEMA
|
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
||||||
from homeassistant.const import CONF_MONITORED_CONDITIONS
|
from homeassistant.const import CONF_MONITORED_CONDITIONS
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import TEMP_FAHRENHEIT, TEMP_CELSIUS, CONF_MONITORED_CONDITIONS
|
from homeassistant.const import CONF_MONITORED_CONDITIONS, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
from . import BLOOMSKY
|
from . import BLOOMSKY
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.event import async_track_time_interval
|
from homeassistant.helpers.event import async_track_time_interval
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_CLEAR_TIMER,
|
SERVICE_CLEAR_TIMER,
|
||||||
|
|
|
@ -4,18 +4,18 @@ import logging
|
||||||
|
|
||||||
import pygatt # pylint: disable=import-error
|
import pygatt # pylint: disable=import-error
|
||||||
|
|
||||||
from homeassistant.helpers.event import track_point_in_utc_time
|
from homeassistant.components.device_tracker.const import (
|
||||||
|
CONF_SCAN_INTERVAL,
|
||||||
|
CONF_TRACK_NEW,
|
||||||
|
SCAN_INTERVAL,
|
||||||
|
SOURCE_TYPE_BLUETOOTH_LE,
|
||||||
|
)
|
||||||
from homeassistant.components.device_tracker.legacy import (
|
from homeassistant.components.device_tracker.legacy import (
|
||||||
YAML_DEVICES,
|
YAML_DEVICES,
|
||||||
async_load_config,
|
async_load_config,
|
||||||
)
|
)
|
||||||
from homeassistant.components.device_tracker.const import (
|
|
||||||
CONF_TRACK_NEW,
|
|
||||||
CONF_SCAN_INTERVAL,
|
|
||||||
SCAN_INTERVAL,
|
|
||||||
SOURCE_TYPE_BLUETOOTH_LE,
|
|
||||||
)
|
|
||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||||
|
from homeassistant.helpers.event import track_point_in_utc_time
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""Tracking for bluetooth devices."""
|
"""Tracking for bluetooth devices."""
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from typing import List, Set, Tuple, Optional
|
from typing import List, Optional, Set, Tuple
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
import bluetooth
|
import bluetooth
|
||||||
|
|
|
@ -3,14 +3,13 @@ from datetime import timedelta
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import smbus # pylint: disable=import-error
|
|
||||||
from i2csense.bme280 import BME280 # pylint: disable=import-error
|
from i2csense.bme280 import BME280 # pylint: disable=import-error
|
||||||
|
import smbus # pylint: disable=import-error
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_NAME, TEMP_FAHRENHEIT
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.const import TEMP_FAHRENHEIT, CONF_NAME, CONF_MONITORED_CONDITIONS
|
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
from homeassistant.util.temperature import celsius_to_fahrenheit
|
from homeassistant.util.temperature import celsius_to_fahrenheit
|
||||||
|
|
|
@ -3,8 +3,8 @@ import logging
|
||||||
import threading
|
import threading
|
||||||
from time import sleep, time
|
from time import sleep, time
|
||||||
|
|
||||||
from smbus import SMBus # pylint: disable=import-error
|
|
||||||
import bme680 # pylint: disable=import-error
|
import bme680 # pylint: disable=import-error
|
||||||
|
from smbus import SMBus # pylint: disable=import-error
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
|
|
@ -12,19 +12,19 @@ import zipfile
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
import homeassistant.util.dt as dt_util
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_MONITORED_CONDITIONS,
|
|
||||||
TEMP_CELSIUS,
|
|
||||||
CONF_NAME,
|
|
||||||
ATTR_ATTRIBUTION,
|
ATTR_ATTRIBUTION,
|
||||||
CONF_LATITUDE,
|
CONF_LATITUDE,
|
||||||
CONF_LONGITUDE,
|
CONF_LONGITUDE,
|
||||||
|
CONF_MONITORED_CONDITIONS,
|
||||||
|
CONF_NAME,
|
||||||
|
TEMP_CELSIUS,
|
||||||
)
|
)
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
_RESOURCE = "http://www.bom.gov.au/fwo/{}/{}.{}.json"
|
_RESOURCE = "http://www.bom.gov.au/fwo/{}/{}.{}.json"
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -5,7 +5,6 @@ import logging
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import brottsplatskartan
|
import brottsplatskartan
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Support for launching a web browser on the host machine."""
|
"""Support for launching a web browser on the host machine."""
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
ATTR_URL = "url"
|
ATTR_URL = "url"
|
||||||
|
|
|
@ -2,16 +2,15 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import bthomehub5_devicelist
|
import bthomehub5_devicelist
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.device_tracker import (
|
from homeassistant.components.device_tracker import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
DeviceScanner,
|
DeviceScanner,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST
|
from homeassistant.const import CONF_HOST
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""The test for the bayesian sensor platform."""
|
"""The test for the bayesian sensor platform."""
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
from homeassistant.components.bayesian import binary_sensor as bayesian
|
from homeassistant.components.bayesian import binary_sensor as bayesian
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant
|
from tests.common import get_test_home_assistant
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
"""The tests for the Monoprice Blackbird media player platform."""
|
"""The tests for the Monoprice Blackbird media player platform."""
|
||||||
|
from collections import defaultdict
|
||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from collections import defaultdict
|
from homeassistant.components.blackbird.const import DOMAIN, SERVICE_SETALLZONES
|
||||||
from homeassistant.components.media_player.const import (
|
|
||||||
SUPPORT_TURN_ON,
|
|
||||||
SUPPORT_TURN_OFF,
|
|
||||||
SUPPORT_SELECT_SOURCE,
|
|
||||||
)
|
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF
|
|
||||||
|
|
||||||
import tests.common
|
|
||||||
from homeassistant.components.blackbird.media_player import (
|
from homeassistant.components.blackbird.media_player import (
|
||||||
DATA_BLACKBIRD,
|
DATA_BLACKBIRD,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
setup_platform,
|
setup_platform,
|
||||||
)
|
)
|
||||||
from homeassistant.components.blackbird.const import DOMAIN, SERVICE_SETALLZONES
|
from homeassistant.components.media_player.const import (
|
||||||
import pytest
|
SUPPORT_SELECT_SOURCE,
|
||||||
|
SUPPORT_TURN_OFF,
|
||||||
|
SUPPORT_TURN_ON,
|
||||||
|
)
|
||||||
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
|
|
||||||
|
import tests.common
|
||||||
|
|
||||||
|
|
||||||
class AttrDict(dict):
|
class AttrDict(dict):
|
||||||
|
|
|
@ -10,6 +10,7 @@ import requests
|
||||||
from homeassistant.components import sensor
|
from homeassistant.components import sensor
|
||||||
from homeassistant.components.bom.sensor import BOMCurrentData
|
from homeassistant.components.bom.sensor import BOMCurrentData
|
||||||
from homeassistant.setup import setup_component
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import assert_setup_component, get_test_home_assistant, load_fixture
|
from tests.common import assert_setup_component, get_test_home_assistant, load_fixture
|
||||||
|
|
||||||
VALID_CONFIG = {
|
VALID_CONFIG = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue