mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
More isort preparations (#16633)
* Adjust config closer to currently established style conventions * Adjust some imports for better outcome with their comments
This commit is contained in:
parent
0121e3cb04
commit
227a1b919b
@ -9,8 +9,8 @@ import datetime
|
|||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
from homeassistant.helpers.event import track_point_in_time
|
from homeassistant.helpers.event import track_point_in_time
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.zwave import workaround
|
from homeassistant.components.zwave import ( # noqa pylint: disable=unused-import
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
async_setup_platform, workaround)
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
BinarySensorDevice)
|
BinarySensorDevice)
|
||||||
|
@ -10,8 +10,8 @@ from homeassistant.components.climate import (
|
|||||||
DOMAIN, ClimateDevice, STATE_AUTO, STATE_COOL, STATE_HEAT,
|
DOMAIN, ClimateDevice, STATE_AUTO, STATE_COOL, STATE_HEAT,
|
||||||
SUPPORT_TARGET_TEMPERATURE, SUPPORT_FAN_MODE,
|
SUPPORT_TARGET_TEMPERATURE, SUPPORT_FAN_MODE,
|
||||||
SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE)
|
SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE)
|
||||||
from homeassistant.components.zwave import ZWaveDeviceEntity
|
from homeassistant.components.zwave import ( # noqa pylint: disable=unused-import
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
ZWaveDeviceEntity, async_setup_platform)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_OFF, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE)
|
STATE_OFF, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE)
|
||||||
|
|
||||||
|
@ -9,10 +9,9 @@ https://home-assistant.io/components/cover.zwave/
|
|||||||
import logging
|
import logging
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
DOMAIN, SUPPORT_OPEN, SUPPORT_CLOSE, ATTR_POSITION)
|
DOMAIN, SUPPORT_OPEN, SUPPORT_CLOSE, ATTR_POSITION)
|
||||||
from homeassistant.components.zwave import ZWaveDeviceEntity
|
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
from homeassistant.components.zwave import ( # noqa pylint: disable=unused-import
|
||||||
from homeassistant.components.zwave import workaround
|
ZWaveDeviceEntity, async_setup_platform, workaround)
|
||||||
from homeassistant.components.cover import CoverDevice
|
from homeassistant.components.cover import CoverDevice
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -9,7 +9,6 @@ import logging
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
# from voluptuous.humanize import humanize_error
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.http import HomeAssistantView
|
from homeassistant.components.http import HomeAssistantView
|
||||||
@ -274,8 +273,9 @@ class iOSIdentifyDeviceView(HomeAssistantView):
|
|||||||
# try:
|
# try:
|
||||||
# data = IDENTIFY_SCHEMA(req_data)
|
# data = IDENTIFY_SCHEMA(req_data)
|
||||||
# except vol.Invalid as ex:
|
# except vol.Invalid as ex:
|
||||||
# return self.json_message(humanize_error(request.json, ex),
|
# return self.json_message(
|
||||||
# HTTP_BAD_REQUEST)
|
# vol.humanize.humanize_error(request.json, ex),
|
||||||
|
# HTTP_BAD_REQUEST)
|
||||||
|
|
||||||
data[ATTR_LAST_SEEN_AT] = datetime.datetime.now().isoformat()
|
data[ATTR_LAST_SEEN_AT] = datetime.datetime.now().isoformat()
|
||||||
|
|
||||||
|
@ -33,3 +33,8 @@ not_skip = __init__.py
|
|||||||
# will group `import x` and `from x import` of the same module.
|
# will group `import x` and `from x import` of the same module.
|
||||||
force_sort_within_sections = true
|
force_sort_within_sections = true
|
||||||
sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||||
|
default_section = THIRDPARTY
|
||||||
|
known_first_party = homeassistant,tests
|
||||||
|
forced_separate = tests
|
||||||
|
combine_as_imports = true
|
||||||
|
use_parentheses = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user