From 8338aadf8c174c97733233cf6cad6de9ed9a0af9 Mon Sep 17 00:00:00 2001 From: functionpointer Date: Sat, 23 Jan 2021 14:02:21 +0100 Subject: [PATCH] MySensors: Absolute imports and cosmetic changes --- homeassistant/components/mysensors/__init__.py | 8 ++++---- homeassistant/components/mysensors/config_flow.py | 7 +++---- homeassistant/components/mysensors/gateway.py | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/mysensors/__init__.py b/homeassistant/components/mysensors/__init__.py index 3e099ba0c6e..f314b695164 100644 --- a/homeassistant/components/mysensors/__init__.py +++ b/homeassistant/components/mysensors/__init__.py @@ -5,14 +5,14 @@ from typing import Callable, Dict, List, Optional, Tuple, Type, Union from mysensors import BaseAsyncGateway import voluptuous as vol +from homeassistant import config_entries from homeassistant.components.mqtt import valid_publish_topic, valid_subscribe_topic +from homeassistant.config_entries import ConfigEntry +from homeassistant.const import CONF_OPTIMISTIC from homeassistant.core import callback import homeassistant.helpers.config_validation as cv +from homeassistant.helpers.typing import ConfigType, HomeAssistantType -from ... import config_entries -from ...config_entries import ConfigEntry -from ...const import CONF_OPTIMISTIC -from ...helpers.typing import ConfigType, HomeAssistantType from .const import ( ATTR_DEVICES, CONF_BAUD_RATE, diff --git a/homeassistant/components/mysensors/config_flow.py b/homeassistant/components/mysensors/config_flow.py index 53a08a0fd0a..2cb0c2e56d0 100644 --- a/homeassistant/components/mysensors/config_flow.py +++ b/homeassistant/components/mysensors/config_flow.py @@ -85,12 +85,11 @@ async def try_connect(hass: HomeAssistantType, user_input: Dict[str, str]) -> bo def _get_schema_common() -> dict: """Create a schema with options common to all gateway types.""" - schema = dict() - schema[ + schema = { vol.Required( CONF_VERSION, default="", description={"suggested_value": DEFAULT_VERSION} - ) - ] = str + ): str + } return schema diff --git a/homeassistant/components/mysensors/gateway.py b/homeassistant/components/mysensors/gateway.py index 181ba6be7db..ddb5930eb71 100644 --- a/homeassistant/components/mysensors/gateway.py +++ b/homeassistant/components/mysensors/gateway.py @@ -10,12 +10,12 @@ import async_timeout from mysensors import BaseAsyncGateway, Message, Sensor, mysensors import voluptuous as vol +from homeassistant.config_entries import ConfigEntry from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.core import callback import homeassistant.helpers.config_validation as cv +from homeassistant.helpers.typing import HomeAssistantType -from ...config_entries import ConfigEntry -from ...helpers.typing import HomeAssistantType from .const import ( CONF_BAUD_RATE, CONF_DEVICE,