use isort to sort imports according to PEP8 for cloud (#29626)

This commit is contained in:
Bas Nijholt authored and Fabian Affolter committed 2019-12-08 22:31:12 +05:30
1 parent e4e9cdce73
commit fbd4cf1089
17 files changed
+71 -71

No files matched your search

@@ -7,7 +7,7 @@ from hass_nabucasa import account_link
from homeassistant.const import MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import event, config_entry_oauth2_flow
from homeassistant.helpers import config_entry_oauth2_flow, event
from .const import DOMAIN
@@ -7,24 +7,23 @@ import aiohttp
import async_timeout
from hass_nabucasa import cloud_api
from homeassistant.core import callback
from homeassistant.components.alexa import (
config as alexa_config,
entities as alexa_entities,
errors as alexa_errors,
state_report as alexa_state_report,
)
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
from homeassistant.core import callback
from homeassistant.helpers import entity_registry
from homeassistant.helpers.event import async_call_later
from homeassistant.util.dt import utcnow
from homeassistant.components.alexa import (
config as alexa_config,
errors as alexa_errors,
entities as alexa_entities,
state_report as alexa_state_report,
)
from .const import (
CONF_ENTITY_CONFIG,
CONF_FILTER,
PREF_SHOULD_EXPOSE,
DEFAULT_SHOULD_EXPOSE,
PREF_SHOULD_EXPOSE,
RequireRelink,
)
@@ -6,7 +6,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
WAIT_UNTIL_CHANGE = 3
+8 -9
View File
@@ -1,27 +1,26 @@
"""Interface implementation for cloud client."""
import asyncio
import logging
from pathlib import Path
from typing import Any, Dict
import logging
import aiohttp
from hass_nabucasa.client import CloudClient as Interface
from homeassistant.core import callback, Context
from homeassistant.components.google_assistant import smart_home as ga
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.util.aiohttp import MockRequest
from homeassistant.components.alexa import (
smart_home as alexa_sh,
errors as alexa_errors,
smart_home as alexa_sh,
)
from homeassistant.components.google_assistant import smart_home as ga
from homeassistant.core import Context, callback
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.util.aiohttp import MockRequest
from . import utils, alexa_config, google_config
from . import alexa_config, google_config, utils
from .const import DISPATCHER_REMOTE_UPDATE
from .prefs import CloudPreferences
_LOGGER = logging.getLogger(__name__)
@@ -5,16 +5,16 @@ import logging
import async_timeout
from hass_nabucasa.google_report_state import ErrorResponse
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
from homeassistant.components.google_assistant.helpers import AbstractConfig
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
from homeassistant.helpers import entity_registry
from .const import (
PREF_SHOULD_EXPOSE,
DEFAULT_SHOULD_EXPOSE,
CONF_ENTITY_CONFIG,
PREF_DISABLE_2FA,
DEFAULT_DISABLE_2FA,
DEFAULT_SHOULD_EXPOSE,
PREF_DISABLE_2FA,
PREF_SHOULD_EXPOSE,
)
_LOGGER = logging.getLogger(__name__)
+15 -15
View File
@@ -2,31 +2,31 @@
from ipaddress import ip_address
from typing import Optional
from homeassistant.core import callback
from homeassistant.auth.models import User
from homeassistant.auth.const import GROUP_ID_ADMIN
from homeassistant.auth.models import User
from homeassistant.core import callback
from homeassistant.util.logging import async_create_catching_coro
from .const import (
DEFAULT_ALEXA_REPORT_STATE,
DEFAULT_GOOGLE_REPORT_STATE,
DOMAIN,
PREF_ALEXA_ENTITY_CONFIGS,
PREF_ALEXA_REPORT_STATE,
PREF_ALIASES,
PREF_CLOUD_USER,
PREF_CLOUDHOOKS,
PREF_DISABLE_2FA,
PREF_ENABLE_ALEXA,
PREF_ENABLE_GOOGLE,
PREF_ENABLE_REMOTE,
PREF_GOOGLE_SECURE_DEVICES_PIN,
PREF_CLOUDHOOKS,
PREF_CLOUD_USER,
PREF_GOOGLE_ENTITY_CONFIGS,
PREF_OVERRIDE_NAME,
PREF_DISABLE_2FA,
PREF_ALIASES,
PREF_SHOULD_EXPOSE,
PREF_ALEXA_ENTITY_CONFIGS,
PREF_ALEXA_REPORT_STATE,
PREF_USERNAME,
DEFAULT_ALEXA_REPORT_STATE,
PREF_GOOGLE_REPORT_STATE,
PREF_GOOGLE_LOCAL_WEBHOOK_ID,
DEFAULT_GOOGLE_REPORT_STATE,
PREF_GOOGLE_REPORT_STATE,
PREF_GOOGLE_SECURE_DEVICES_PIN,
PREF_OVERRIDE_NAME,
PREF_SHOULD_EXPOSE,
PREF_USERNAME,
InvalidTrustedNetworks,
InvalidTrustedProxies,
)
+1 -1
View File
@@ -1,7 +1,7 @@
"""Support for the cloud for text to speech service."""
from hass_nabucasa.voice import VoiceError
from hass_nabucasa import Cloud
from hass_nabucasa.voice import VoiceError
import voluptuous as vol
from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider
+1 -1
View File
@@ -1,7 +1,7 @@
"""Helper functions for cloud components."""
from typing import Any, Dict
from aiohttp import web, payload
from aiohttp import payload, web
def aiohttp_serialize_response(response: web.Response) -> Dict[str, Any]: