Sort imports according to PEP8 for components starting with "C" (#29763)
parent
6cc75fc6f3
commit
080c702d4f
|
@ -17,7 +17,6 @@ from homeassistant.helpers.entity_component import EntityComponent
|
|||
from homeassistant.helpers.template import DATE_STR_FORMAT
|
||||
from homeassistant.util import dt
|
||||
|
||||
|
||||
# mypy: allow-untyped-defs, no-check-untyped-defs
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -4,11 +4,10 @@ import logging
|
|||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
from homeassistant.const import CONF_API_KEY, CONF_RECIPIENT
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_NAME = "clickatell"
|
||||
|
|
|
@ -6,6 +6,7 @@ from aiohttp.hdrs import CONTENT_TYPE
|
|||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
from homeassistant.const import (
|
||||
CONF_API_KEY,
|
||||
CONF_RECIPIENT,
|
||||
|
@ -15,8 +16,6 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BASE_API_URL = "https://rest.clicksend.com/v3"
|
||||
|
|
|
@ -6,6 +6,7 @@ from aiohttp.hdrs import CONTENT_TYPE
|
|||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
from homeassistant.const import (
|
||||
CONF_API_KEY,
|
||||
CONF_RECIPIENT,
|
||||
|
@ -14,8 +15,6 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BASE_API_URL = "https://rest.clicksend.com/v3"
|
||||
|
|
|
@ -9,14 +9,14 @@ the user has submitted configuration information.
|
|||
import functools as ft
|
||||
import logging
|
||||
|
||||
from homeassistant.core import callback as async_callback
|
||||
from homeassistant.const import (
|
||||
EVENT_TIME_CHANGED,
|
||||
ATTR_FRIENDLY_NAME,
|
||||
ATTR_ENTITY_PICTURE,
|
||||
ATTR_FRIENDLY_NAME,
|
||||
EVENT_TIME_CHANGED,
|
||||
)
|
||||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.core import callback as async_callback
|
||||
from homeassistant.helpers.entity import async_generate_entity_id
|
||||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.util.async_ import run_callback_threadsafe
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -11,7 +11,7 @@ from homeassistant.helpers import config_validation as cv, intent
|
|||
from homeassistant.loader import bind_hass
|
||||
|
||||
from .agent import AbstractConversationAgent
|
||||
from .default_agent import async_register, DefaultAgent
|
||||
from .default_agent import DefaultAgent, async_register
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
from pycoolmasternet import CoolMasterNet
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import core, config_entries
|
||||
from homeassistant import config_entries, core
|
||||
from homeassistant.const import CONF_HOST, CONF_PORT
|
||||
|
||||
# pylint: disable=unused-import
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
"""Details about printers which are connected to CUPS."""
|
||||
from datetime import timedelta
|
||||
import importlib
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_HOST, CONF_PORT
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -5,15 +5,15 @@ import logging
|
|||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
CONF_API_KEY,
|
||||
CONF_NAME,
|
||||
CONF_BASE,
|
||||
CONF_QUOTE,
|
||||
ATTR_ATTRIBUTION,
|
||||
CONF_API_KEY,
|
||||
CONF_BASE,
|
||||
CONF_NAME,
|
||||
CONF_QUOTE,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
"""The tests for the Canary component."""
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock, PropertyMock
|
||||
from unittest.mock import MagicMock, PropertyMock, patch
|
||||
|
||||
import homeassistant.components.canary as canary
|
||||
from homeassistant import setup
|
||||
import homeassistant.components.canary as canary
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
||||
|
|
|
@ -3,16 +3,16 @@ import copy
|
|||
import unittest
|
||||
from unittest.mock import Mock
|
||||
|
||||
from homeassistant.components.canary import DATA_CANARY
|
||||
from homeassistant.components.canary import sensor as canary
|
||||
from homeassistant.components.canary import DATA_CANARY, sensor as canary
|
||||
from homeassistant.components.canary.sensor import (
|
||||
CanarySensor,
|
||||
SENSOR_TYPES,
|
||||
ATTR_AIR_QUALITY,
|
||||
STATE_AIR_QUALITY_NORMAL,
|
||||
SENSOR_TYPES,
|
||||
STATE_AIR_QUALITY_ABNORMAL,
|
||||
STATE_AIR_QUALITY_NORMAL,
|
||||
STATE_AIR_QUALITY_VERY_ABNORMAL,
|
||||
CanarySensor,
|
||||
)
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
from tests.components.canary.test_init import mock_device, mock_location
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
"""Tests for the CoinMarketCap sensor platform."""
|
||||
import json
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
import homeassistant.components.sensor as sensor
|
||||
from homeassistant.setup import setup_component
|
||||
from tests.common import get_test_home_assistant, load_fixture, assert_setup_component
|
||||
|
||||
from tests.common import assert_setup_component, get_test_home_assistant, load_fixture
|
||||
|
||||
VALID_CONFIG = {
|
||||
"platform": "coinmarketcap",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import unittest
|
||||
|
||||
import homeassistant.components.configurator as configurator
|
||||
from homeassistant.const import EVENT_TIME_CHANGED, ATTR_FRIENDLY_NAME
|
||||
from homeassistant.const import ATTR_FRIENDLY_NAME, EVENT_TIME_CHANGED
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
"""The tests for the Conversation component."""
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import DOMAIN as HASS_DOMAIN, Context
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components import conversation
|
||||
from homeassistant.core import DOMAIN as HASS_DOMAIN, Context
|
||||
from homeassistant.helpers import intent
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import async_mock_intent, async_mock_service
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from unittest.mock import patch
|
||||
|
||||
from homeassistant import config_entries, setup
|
||||
from homeassistant.components.coolmaster.const import DOMAIN, AVAILABLE_MODES
|
||||
from homeassistant.components.coolmaster.const import AVAILABLE_MODES, DOMAIN
|
||||
|
||||
from tests.common import mock_coro
|
||||
|
||||
|
|
Loading…
Reference in New Issue