mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix isort on a small set of misc files (#29803)
This commit is contained in:
parent
27244e29c4
commit
f5d4878992
@ -8,7 +8,6 @@ Loosely based on https://github.com/astropy/astropy/pull/347
|
|||||||
import os
|
import os
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
|
||||||
__licence__ = 'BSD (3 clause)'
|
__licence__ = 'BSD (3 clause)'
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#
|
#
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import inspect
|
import inspect
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from homeassistant.const import __version__, __short_version__
|
from homeassistant.const import __short_version__, __version__
|
||||||
|
|
||||||
PROJECT_NAME = 'Home Assistant'
|
PROJECT_NAME = 'Home Assistant'
|
||||||
PROJECT_PACKAGE_NAME = 'homeassistant'
|
PROJECT_PACKAGE_NAME = 'homeassistant'
|
||||||
|
@ -58,7 +58,6 @@ from .const import (
|
|||||||
SERVICE_SET_VOLUME,
|
SERVICE_SET_VOLUME,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DEFAULT_NAME = "Xiaomi Miio Device"
|
DEFAULT_NAME = "Xiaomi Miio Device"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""The tests for the feedreader component."""
|
"""The tests for the feedreader component."""
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
from genericpath import exists
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from os import remove
|
from os import remove
|
||||||
import time
|
import time
|
||||||
@ -7,8 +8,6 @@ import unittest
|
|||||||
from unittest import mock
|
from unittest import mock
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from genericpath import exists
|
|
||||||
|
|
||||||
from homeassistant.components import feedreader
|
from homeassistant.components import feedreader
|
||||||
from homeassistant.components.feedreader import (
|
from homeassistant.components.feedreader import (
|
||||||
CONF_MAX_ENTRIES,
|
CONF_MAX_ENTRIES,
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
"""Tests for the iCloud config flow."""
|
"""Tests for the iCloud config flow."""
|
||||||
from unittest.mock import patch, Mock, MagicMock
|
from unittest.mock import MagicMock, Mock, patch
|
||||||
import pytest
|
|
||||||
|
|
||||||
from pyicloud.exceptions import PyiCloudFailedLoginException
|
from pyicloud.exceptions import PyiCloudFailedLoginException
|
||||||
|
import pytest
|
||||||
|
|
||||||
from homeassistant import data_entry_flow
|
from homeassistant import data_entry_flow
|
||||||
from homeassistant.components.icloud import config_flow
|
from homeassistant.components.icloud import config_flow
|
||||||
|
|
||||||
from homeassistant.components.icloud.config_flow import (
|
from homeassistant.components.icloud.config_flow import (
|
||||||
CONF_TRUSTED_DEVICE,
|
CONF_TRUSTED_DEVICE,
|
||||||
CONF_VERIFICATION_CODE,
|
CONF_VERIFICATION_CODE,
|
||||||
)
|
)
|
||||||
from homeassistant.components.icloud.const import (
|
from homeassistant.components.icloud.const import (
|
||||||
DOMAIN,
|
|
||||||
CONF_ACCOUNT_NAME,
|
CONF_ACCOUNT_NAME,
|
||||||
CONF_GPS_ACCURACY_THRESHOLD,
|
CONF_GPS_ACCURACY_THRESHOLD,
|
||||||
CONF_MAX_INTERVAL,
|
CONF_MAX_INTERVAL,
|
||||||
DEFAULT_GPS_ACCURACY_THRESHOLD,
|
DEFAULT_GPS_ACCURACY_THRESHOLD,
|
||||||
DEFAULT_MAX_INTERVAL,
|
DEFAULT_MAX_INTERVAL,
|
||||||
|
DOMAIN,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||||
from homeassistant.helpers.typing import HomeAssistantType
|
from homeassistant.helpers.typing import HomeAssistantType
|
||||||
|
@ -8,10 +8,10 @@ from homeassistant.const import STATE_OFF, STATE_ON
|
|||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
from tests.common import async_fire_time_changed
|
|
||||||
|
|
||||||
from . import alter_time, make_jerusalem_test_params, make_nyc_test_params
|
from . import alter_time, make_jerusalem_test_params, make_nyc_test_params
|
||||||
|
|
||||||
|
from tests.common import async_fire_time_changed
|
||||||
|
|
||||||
MELACHA_PARAMS = [
|
MELACHA_PARAMS = [
|
||||||
make_nyc_test_params(dt(2018, 9, 1, 16, 0), STATE_ON),
|
make_nyc_test_params(dt(2018, 9, 1, 16, 0), STATE_ON),
|
||||||
make_nyc_test_params(dt(2018, 9, 1, 20, 21), STATE_OFF),
|
make_nyc_test_params(dt(2018, 9, 1, 20, 21), STATE_OFF),
|
||||||
|
@ -7,10 +7,10 @@ from homeassistant.components import jewish_calendar
|
|||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
from tests.common import async_fire_time_changed
|
|
||||||
|
|
||||||
from . import alter_time, make_jerusalem_test_params, make_nyc_test_params
|
from . import alter_time, make_jerusalem_test_params, make_nyc_test_params
|
||||||
|
|
||||||
|
from tests.common import async_fire_time_changed
|
||||||
|
|
||||||
|
|
||||||
async def test_jewish_calendar_min_config(hass):
|
async def test_jewish_calendar_min_config(hass):
|
||||||
"""Test minimum jewish calendar configuration."""
|
"""Test minimum jewish calendar configuration."""
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""The tests for the Xiaomi vacuum platform."""
|
"""The tests for the Xiaomi vacuum platform."""
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import timedelta, time
|
from datetime import time, timedelta
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -22,26 +22,26 @@ from homeassistant.components.vacuum import (
|
|||||||
)
|
)
|
||||||
from homeassistant.components.xiaomi_miio.vacuum import (
|
from homeassistant.components.xiaomi_miio.vacuum import (
|
||||||
ATTR_CLEANED_AREA,
|
ATTR_CLEANED_AREA,
|
||||||
|
ATTR_CLEANED_TOTAL_AREA,
|
||||||
|
ATTR_CLEANING_COUNT,
|
||||||
ATTR_CLEANING_TIME,
|
ATTR_CLEANING_TIME,
|
||||||
|
ATTR_CLEANING_TOTAL_TIME,
|
||||||
ATTR_DO_NOT_DISTURB,
|
ATTR_DO_NOT_DISTURB,
|
||||||
ATTR_DO_NOT_DISTURB_START,
|
|
||||||
ATTR_DO_NOT_DISTURB_END,
|
ATTR_DO_NOT_DISTURB_END,
|
||||||
|
ATTR_DO_NOT_DISTURB_START,
|
||||||
ATTR_ERROR,
|
ATTR_ERROR,
|
||||||
|
ATTR_FILTER_LEFT,
|
||||||
ATTR_MAIN_BRUSH_LEFT,
|
ATTR_MAIN_BRUSH_LEFT,
|
||||||
ATTR_SIDE_BRUSH_LEFT,
|
ATTR_SIDE_BRUSH_LEFT,
|
||||||
ATTR_FILTER_LEFT,
|
|
||||||
ATTR_CLEANING_COUNT,
|
|
||||||
ATTR_CLEANED_TOTAL_AREA,
|
|
||||||
ATTR_CLEANING_TOTAL_TIME,
|
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
CONF_TOKEN,
|
CONF_TOKEN,
|
||||||
DOMAIN as XIAOMI_DOMAIN,
|
DOMAIN as XIAOMI_DOMAIN,
|
||||||
|
SERVICE_CLEAN_ZONE,
|
||||||
SERVICE_MOVE_REMOTE_CONTROL,
|
SERVICE_MOVE_REMOTE_CONTROL,
|
||||||
SERVICE_MOVE_REMOTE_CONTROL_STEP,
|
SERVICE_MOVE_REMOTE_CONTROL_STEP,
|
||||||
SERVICE_START_REMOTE_CONTROL,
|
SERVICE_START_REMOTE_CONTROL,
|
||||||
SERVICE_STOP_REMOTE_CONTROL,
|
SERVICE_STOP_REMOTE_CONTROL,
|
||||||
SERVICE_CLEAN_ZONE,
|
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user