diff --git a/homeassistant/components/abode/config_flow.py b/homeassistant/components/abode/config_flow.py index d1e66b3a3dc..4e6a6f4c904 100644 --- a/homeassistant/components/abode/config_flow.py +++ b/homeassistant/components/abode/config_flow.py @@ -8,7 +8,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, HTTP_BAD_REQUEST -from .const import DEFAULT_CACHEDB, DOMAIN, LOGGER # pylint: disable=unused-import +from .const import DEFAULT_CACHEDB, DOMAIN, LOGGER CONF_MFA = "mfa_code" CONF_POLLING = "polling" diff --git a/homeassistant/components/accuweather/config_flow.py b/homeassistant/components/accuweather/config_flow.py index 03d6f40181c..6dac2aee286 100644 --- a/homeassistant/components/accuweather/config_flow.py +++ b/homeassistant/components/accuweather/config_flow.py @@ -13,7 +13,7 @@ from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv -from .const import CONF_FORECAST, DOMAIN # pylint:disable=unused-import +from .const import CONF_FORECAST, DOMAIN class AccuWeatherFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/acmeda/config_flow.py b/homeassistant/components/acmeda/config_flow.py index 5cdb804d5dd..70935b70869 100644 --- a/homeassistant/components/acmeda/config_flow.py +++ b/homeassistant/components/acmeda/config_flow.py @@ -10,7 +10,7 @@ import voluptuous as vol from homeassistant import config_entries -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class AcmedaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/adguard/config_flow.py b/homeassistant/components/adguard/config_flow.py index 08650f353b9..d5ec79d788f 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -18,7 +18,7 @@ from homeassistant.const import ( ) from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class AdGuardHomeFlowHandler(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/aemet/config_flow.py b/homeassistant/components/aemet/config_flow.py index 27f389660a8..2e36896c1eb 100644 --- a/homeassistant/components/aemet/config_flow.py +++ b/homeassistant/components/aemet/config_flow.py @@ -6,8 +6,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME import homeassistant.helpers.config_validation as cv -from .const import DEFAULT_NAME -from .const import DOMAIN # pylint:disable=unused-import +from .const import DEFAULT_NAME, DOMAIN class AemetConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/agent_dvr/config_flow.py b/homeassistant/components/agent_dvr/config_flow.py index 15ef58ced7e..a21e6855337 100644 --- a/homeassistant/components/agent_dvr/config_flow.py +++ b/homeassistant/components/agent_dvr/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_PORT from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN, SERVER_URL # pylint:disable=unused-import +from .const import DOMAIN, SERVER_URL from .helpers import generate_url DEFAULT_PORT = 8090 diff --git a/homeassistant/components/airly/config_flow.py b/homeassistant/components/airly/config_flow.py index d7636d1db33..3b1432f77ba 100644 --- a/homeassistant/components/airly/config_flow.py +++ b/homeassistant/components/airly/config_flow.py @@ -16,11 +16,7 @@ from homeassistant.const import ( from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv -from .const import ( # pylint:disable=unused-import - CONF_USE_NEAREST, - DOMAIN, - NO_AIRLY_SENSORS, -) +from .const import CONF_USE_NEAREST, DOMAIN, NO_AIRLY_SENSORS class AirlyFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/airnow/config_flow.py b/homeassistant/components/airnow/config_flow.py index 6d53ac133ee..b4de58808da 100644 --- a/homeassistant/components/airnow/config_flow.py +++ b/homeassistant/components/airnow/config_flow.py @@ -10,7 +10,7 @@ from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CON from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/airvisual/config_flow.py b/homeassistant/components/airvisual/config_flow.py index 12dec114349..128a06b7400 100644 --- a/homeassistant/components/airvisual/config_flow.py +++ b/homeassistant/components/airvisual/config_flow.py @@ -24,7 +24,7 @@ from homeassistant.core import callback from homeassistant.helpers import aiohttp_client, config_validation as cv from . import async_get_geography_id -from .const import ( # pylint: disable=unused-import +from .const import ( CONF_CITY, CONF_COUNTRY, CONF_INTEGRATION_TYPE, diff --git a/homeassistant/components/alarmdecoder/config_flow.py b/homeassistant/components/alarmdecoder/config_flow.py index 08c8052c04b..137795c684f 100644 --- a/homeassistant/components/alarmdecoder/config_flow.py +++ b/homeassistant/components/alarmdecoder/config_flow.py @@ -11,7 +11,7 @@ from homeassistant.components.binary_sensor import DEVICE_CLASSES from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PROTOCOL from homeassistant.core import callback -from .const import ( # pylint: disable=unused-import +from .const import ( CONF_ALT_NIGHT_MODE, CONF_AUTO_BYPASS, CONF_CODE_ARM_REQUIRED, diff --git a/homeassistant/components/alexa/intent.py b/homeassistant/components/alexa/intent.py index edc7ec6fa98..f64031250e2 100644 --- a/homeassistant/components/alexa/intent.py +++ b/homeassistant/components/alexa/intent.py @@ -18,7 +18,6 @@ INTENTS_API_ENDPOINT = "/api/alexa" class SpeechType(enum.Enum): - # pylint: disable=invalid-name """The Alexa speech types.""" plaintext = "PlainText" @@ -29,7 +28,6 @@ SPEECH_MAPPINGS = {"plain": SpeechType.plaintext, "ssml": SpeechType.ssml} class CardType(enum.Enum): - # pylint: disable=invalid-name """The Alexa card types.""" simple = "Simple" diff --git a/homeassistant/components/ambient_station/config_flow.py b/homeassistant/components/ambient_station/config_flow.py index a4c0a6aa44f..30548bbe31b 100644 --- a/homeassistant/components/ambient_station/config_flow.py +++ b/homeassistant/components/ambient_station/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_API_KEY from homeassistant.helpers import aiohttp_client -from .const import CONF_APP_KEY, DOMAIN # pylint: disable=unused-import +from .const import CONF_APP_KEY, DOMAIN class AmbientStationFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/apple_tv/config_flow.py b/homeassistant/components/apple_tv/config_flow.py index ad56561ef9b..ab4ced1547f 100644 --- a/homeassistant/components/apple_tv/config_flow.py +++ b/homeassistant/components/apple_tv/config_flow.py @@ -21,8 +21,7 @@ from homeassistant.data_entry_flow import AbortFlow from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_CREDENTIALS, CONF_IDENTIFIER, CONF_START_OFF -from .const import DOMAIN # pylint: disable=unused-import +from .const import CONF_CREDENTIALS, CONF_IDENTIFIER, CONF_START_OFF, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/asuswrt/config_flow.py b/homeassistant/components/asuswrt/config_flow.py index 94b5fd0f691..af778dbe972 100644 --- a/homeassistant/components/asuswrt/config_flow.py +++ b/homeassistant/components/asuswrt/config_flow.py @@ -31,12 +31,12 @@ from .const import ( DEFAULT_INTERFACE, DEFAULT_SSH_PORT, DEFAULT_TRACK_UNKNOWN, + DOMAIN, MODE_AP, MODE_ROUTER, PROTOCOL_SSH, PROTOCOL_TELNET, ) -from .const import DOMAIN # pylint:disable=unused-import from .router import get_api RESULT_CONN_ERROR = "cannot_connect" diff --git a/homeassistant/components/atag/config_flow.py b/homeassistant/components/atag/config_flow.py index b1dcedd58dc..20055bd8a9a 100644 --- a/homeassistant/components/atag/config_flow.py +++ b/homeassistant/components/atag/config_flow.py @@ -6,7 +6,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_PORT from homeassistant.helpers.aiohttp_client import async_get_clientsession -from . import DOMAIN # pylint: disable=unused-import +from . import DOMAIN DATA_SCHEMA = { vol.Required(CONF_HOST): str, diff --git a/homeassistant/components/august/config_flow.py b/homeassistant/components/august/config_flow.py index 7176592e37e..0138b438a1e 100644 --- a/homeassistant/components/august/config_flow.py +++ b/homeassistant/components/august/config_flow.py @@ -7,8 +7,7 @@ from yalexs.authenticator import ValidationResult from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import CONF_LOGIN_METHOD, LOGIN_METHODS, VERIFICATION_CODE_KEY -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_LOGIN_METHOD, DOMAIN, LOGIN_METHODS, VERIFICATION_CODE_KEY from .exceptions import CannotConnect, InvalidAuth, RequireValidation from .gateway import AugustGateway diff --git a/homeassistant/components/aurora/config_flow.py b/homeassistant/components/aurora/config_flow.py index 24161c059c1..6e2396d3f5c 100644 --- a/homeassistant/components/aurora/config_flow.py +++ b/homeassistant/components/aurora/config_flow.py @@ -10,12 +10,7 @@ from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from homeassistant.core import callback from homeassistant.helpers import aiohttp_client -from .const import ( # pylint: disable=unused-import - CONF_THRESHOLD, - DEFAULT_NAME, - DEFAULT_THRESHOLD, - DOMAIN, -) +from .const import CONF_THRESHOLD, DEFAULT_NAME, DEFAULT_THRESHOLD, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/automation/trace.py b/homeassistant/components/automation/trace.py index 631d3122e4c..0b335f7d87f 100644 --- a/homeassistant/components/automation/trace.py +++ b/homeassistant/components/automation/trace.py @@ -44,7 +44,7 @@ def trace_automation(hass, automation_id, config, context): try: yield trace - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: if automation_id: trace.set_error(ex) raise ex diff --git a/homeassistant/components/azure_devops/config_flow.py b/homeassistant/components/azure_devops/config_flow.py index d7d6f2868c3..138ea67e788 100644 --- a/homeassistant/components/azure_devops/config_flow.py +++ b/homeassistant/components/azure_devops/config_flow.py @@ -4,7 +4,7 @@ import aiohttp import voluptuous as vol from homeassistant import config_entries -from homeassistant.components.azure_devops.const import ( # pylint:disable=unused-import +from homeassistant.components.azure_devops.const import ( CONF_ORG, CONF_PAT, CONF_PROJECT, diff --git a/homeassistant/components/bmw_connected_drive/config_flow.py b/homeassistant/components/bmw_connected_drive/config_flow.py index fbfa20aff1a..7798dc4e7e8 100644 --- a/homeassistant/components/bmw_connected_drive/config_flow.py +++ b/homeassistant/components/bmw_connected_drive/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_SOURCE, CONF_USERNAME from homeassistant.core import callback -from . import DOMAIN # pylint: disable=unused-import +from . import DOMAIN from .const import CONF_ALLOWED_REGIONS, CONF_READ_ONLY, CONF_USE_LOCATION DATA_SCHEMA = vol.Schema( diff --git a/homeassistant/components/bond/config_flow.py b/homeassistant/components/bond/config_flow.py index 71ad54ee35c..763a0957876 100644 --- a/homeassistant/components/bond/config_flow.py +++ b/homeassistant/components/bond/config_flow.py @@ -17,7 +17,7 @@ from homeassistant.const import ( ) from homeassistant.helpers.typing import DiscoveryInfoType -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN from .utils import BondHub _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/broadlink/config_flow.py b/homeassistant/components/broadlink/config_flow.py index caf5c0eaaa9..8f1d1230734 100644 --- a/homeassistant/components/broadlink/config_flow.py +++ b/homeassistant/components/broadlink/config_flow.py @@ -17,12 +17,7 @@ from homeassistant.components.dhcp import IP_ADDRESS, MAC_ADDRESS from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, CONF_TIMEOUT, CONF_TYPE from homeassistant.helpers import config_validation as cv -from .const import ( # pylint: disable=unused-import - DEFAULT_PORT, - DEFAULT_TIMEOUT, - DOMAIN, - DOMAINS_AND_TYPES, -) +from .const import DEFAULT_PORT, DEFAULT_TIMEOUT, DOMAIN, DOMAINS_AND_TYPES from .helpers import format_mac _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/brother/config_flow.py b/homeassistant/components/brother/config_flow.py index 49f1c0ed1a3..1d635984b72 100644 --- a/homeassistant/components/brother/config_flow.py +++ b/homeassistant/components/brother/config_flow.py @@ -8,7 +8,7 @@ import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import CONF_HOST, CONF_TYPE -from .const import DOMAIN, PRINTER_TYPES # pylint:disable=unused-import +from .const import DOMAIN, PRINTER_TYPES from .utils import get_snmp_engine DATA_SCHEMA = vol.Schema( diff --git a/homeassistant/components/bsblan/config_flow.py b/homeassistant/components/bsblan/config_flow.py index 8ea597d2386..f5df1df0437 100644 --- a/homeassistant/components/bsblan/config_flow.py +++ b/homeassistant/components/bsblan/config_flow.py @@ -12,11 +12,7 @@ from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNA from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import ConfigType -from .const import ( # pylint:disable=unused-import - CONF_DEVICE_IDENT, - CONF_PASSKEY, - DOMAIN, -) +from .const import CONF_DEVICE_IDENT, CONF_PASSKEY, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/canary/config_flow.py b/homeassistant/components/canary/config_flow.py index 7b6b5b3f322..2d324e09cc8 100644 --- a/homeassistant/components/canary/config_flow.py +++ b/homeassistant/components/canary/config_flow.py @@ -13,8 +13,12 @@ from homeassistant.const import CONF_PASSWORD, CONF_TIMEOUT, CONF_USERNAME from homeassistant.core import callback from homeassistant.helpers.typing import ConfigType, HomeAssistantType -from .const import CONF_FFMPEG_ARGUMENTS, DEFAULT_FFMPEG_ARGUMENTS, DEFAULT_TIMEOUT -from .const import DOMAIN # pylint: disable=unused-import +from .const import ( + CONF_FFMPEG_ARGUMENTS, + DEFAULT_FFMPEG_ARGUMENTS, + DEFAULT_TIMEOUT, + DOMAIN, +) _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/cert_expiry/config_flow.py b/homeassistant/components/cert_expiry/config_flow.py index 282c87b25c5..bfa5f46190b 100644 --- a/homeassistant/components/cert_expiry/config_flow.py +++ b/homeassistant/components/cert_expiry/config_flow.py @@ -6,7 +6,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_PORT -from .const import DEFAULT_PORT, DOMAIN # pylint: disable=unused-import +from .const import DEFAULT_PORT, DOMAIN from .errors import ( ConnectionRefused, ConnectionTimeout, diff --git a/homeassistant/components/climacell/config_flow.py b/homeassistant/components/climacell/config_flow.py index cf3bccd3392..ebf63abcae4 100644 --- a/homeassistant/components/climacell/config_flow.py +++ b/homeassistant/components/climacell/config_flow.py @@ -20,8 +20,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.helpers.typing import HomeAssistantType -from .const import CONF_TIMESTEP, DEFAULT_NAME, DEFAULT_TIMESTEP -from .const import DOMAIN # pylint: disable=unused-import +from .const import CONF_TIMESTEP, DEFAULT_NAME, DEFAULT_TIMESTEP, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/cloudflare/config_flow.py b/homeassistant/components/cloudflare/config_flow.py index f530652fe90..0e3468903af 100644 --- a/homeassistant/components/cloudflare/config_flow.py +++ b/homeassistant/components/cloudflare/config_flow.py @@ -19,8 +19,7 @@ from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_RECORDS -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_RECORDS, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/control4/config_flow.py b/homeassistant/components/control4/config_flow.py index 03183edbfda..1456c440dfa 100644 --- a/homeassistant/components/control4/config_flow.py +++ b/homeassistant/components/control4/config_flow.py @@ -19,8 +19,12 @@ from homeassistant.core import callback from homeassistant.helpers import aiohttp_client, config_validation as cv from homeassistant.helpers.device_registry import format_mac -from .const import CONF_CONTROLLER_UNIQUE_ID, DEFAULT_SCAN_INTERVAL, MIN_SCAN_INTERVAL -from .const import DOMAIN # pylint:disable=unused-import +from .const import ( + CONF_CONTROLLER_UNIQUE_ID, + DEFAULT_SCAN_INTERVAL, + DOMAIN, + MIN_SCAN_INTERVAL, +) _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/coolmaster/config_flow.py b/homeassistant/components/coolmaster/config_flow.py index 7c9b4d5d065..04ee995d25c 100644 --- a/homeassistant/components/coolmaster/config_flow.py +++ b/homeassistant/components/coolmaster/config_flow.py @@ -6,7 +6,6 @@ import voluptuous as vol from homeassistant import config_entries, core from homeassistant.const import CONF_HOST, CONF_PORT -# pylint: disable=unused-import from .const import AVAILABLE_MODES, CONF_SUPPORTED_MODES, DEFAULT_PORT, DOMAIN MODES_SCHEMA = {vol.Required(mode, default=True): bool for mode in AVAILABLE_MODES} diff --git a/homeassistant/components/coronavirus/config_flow.py b/homeassistant/components/coronavirus/config_flow.py index ccf2e7f2c75..6d2776c7ecc 100644 --- a/homeassistant/components/coronavirus/config_flow.py +++ b/homeassistant/components/coronavirus/config_flow.py @@ -4,7 +4,7 @@ import voluptuous as vol from homeassistant import config_entries from . import get_coordinator -from .const import DOMAIN, OPTION_WORLDWIDE # pylint:disable=unused-import +from .const import DOMAIN, OPTION_WORLDWIDE class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/demo/config_flow.py b/homeassistant/components/demo/config_flow.py index 35f72e9e0cd..f99693bfeb2 100644 --- a/homeassistant/components/demo/config_flow.py +++ b/homeassistant/components/demo/config_flow.py @@ -5,7 +5,6 @@ from homeassistant import config_entries from homeassistant.core import callback import homeassistant.helpers.config_validation as cv -# pylint: disable=unused-import from . import DOMAIN CONF_STRING = "string" diff --git a/homeassistant/components/devolo_home_control/config_flow.py b/homeassistant/components/devolo_home_control/config_flow.py index 3f51a9c0884..d6dbd331d5f 100644 --- a/homeassistant/components/devolo_home_control/config_flow.py +++ b/homeassistant/components/devolo_home_control/config_flow.py @@ -8,11 +8,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback -from .const import ( # pylint:disable=unused-import - CONF_MYDEVOLO, - DEFAULT_MYDEVOLO, - DOMAIN, -) +from .const import CONF_MYDEVOLO, DEFAULT_MYDEVOLO, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/dexcom/config_flow.py b/homeassistant/components/dexcom/config_flow.py index 1d6d52fa0c9..0f3aad6f813 100644 --- a/homeassistant/components/dexcom/config_flow.py +++ b/homeassistant/components/dexcom/config_flow.py @@ -6,14 +6,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_UNIT_OF_MEASUREMENT, CONF_USERNAME from homeassistant.core import callback -from .const import ( # pylint:disable=unused-import - CONF_SERVER, - DOMAIN, - MG_DL, - MMOL_L, - SERVER_OUS, - SERVER_US, -) +from .const import CONF_SERVER, DOMAIN, MG_DL, MMOL_L, SERVER_OUS, SERVER_US DATA_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/directv/config_flow.py b/homeassistant/components/directv/config_flow.py index 401ec3b39b6..71a8e052c47 100644 --- a/homeassistant/components/directv/config_flow.py +++ b/homeassistant/components/directv/config_flow.py @@ -18,8 +18,7 @@ from homeassistant.helpers.typing import ( HomeAssistantType, ) -from .const import CONF_RECEIVER_ID -from .const import DOMAIN # pylint: disable=unused-import +from .const import CONF_RECEIVER_ID, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/doorbird/config_flow.py b/homeassistant/components/doorbird/config_flow.py index 4bbd7f8dc86..1b39bb4a8c3 100644 --- a/homeassistant/components/doorbird/config_flow.py +++ b/homeassistant/components/doorbird/config_flow.py @@ -17,8 +17,7 @@ from homeassistant.const import ( from homeassistant.core import callback from homeassistant.util.network import is_link_local -from .const import CONF_EVENTS, DOORBIRD_OUI -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_EVENTS, DOMAIN, DOORBIRD_OUI from .util import get_mac_address_from_doorstation_info _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/dsmr/config_flow.py b/homeassistant/components/dsmr/config_flow.py index 95edb87e947..5a03a80ff52 100644 --- a/homeassistant/components/dsmr/config_flow.py +++ b/homeassistant/components/dsmr/config_flow.py @@ -16,7 +16,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_HOST, CONF_PORT from homeassistant.core import callback -from .const import ( # pylint:disable=unused-import +from .const import ( CONF_DSMR_VERSION, CONF_SERIAL_ID, CONF_SERIAL_ID_GAS, diff --git a/homeassistant/components/dunehd/config_flow.py b/homeassistant/components/dunehd/config_flow.py index 1f0efa668f9..998ff408f36 100644 --- a/homeassistant/components/dunehd/config_flow.py +++ b/homeassistant/components/dunehd/config_flow.py @@ -9,7 +9,7 @@ import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import CONF_HOST -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/eafm/config_flow.py b/homeassistant/components/eafm/config_flow.py index 19b10c3e6c5..98e9158e2df 100644 --- a/homeassistant/components/eafm/config_flow.py +++ b/homeassistant/components/eafm/config_flow.py @@ -5,7 +5,6 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.helpers.aiohttp_client import async_get_clientsession -# pylint: disable=unused-import from .const import DOMAIN diff --git a/homeassistant/components/econet/config_flow.py b/homeassistant/components/econet/config_flow.py index 78aff2eac8f..739606088f6 100644 --- a/homeassistant/components/econet/config_flow.py +++ b/homeassistant/components/econet/config_flow.py @@ -6,7 +6,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class EcoNetFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/elgato/config_flow.py b/homeassistant/components/elgato/config_flow.py index 79960cc95ff..afdbe7e1cdc 100644 --- a/homeassistant/components/elgato/config_flow.py +++ b/homeassistant/components/elgato/config_flow.py @@ -11,7 +11,7 @@ from homeassistant.const import CONF_HOST, CONF_PORT from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_SERIAL_NUMBER, DOMAIN # pylint: disable=unused-import +from .const import CONF_SERIAL_NUMBER, DOMAIN class ElgatoFlowHandler(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/elkm1/config_flow.py b/homeassistant/components/elkm1/config_flow.py index b72cfa19335..86117824767 100644 --- a/homeassistant/components/elkm1/config_flow.py +++ b/homeassistant/components/elkm1/config_flow.py @@ -21,8 +21,7 @@ from homeassistant.const import ( from homeassistant.util import slugify from . import async_wait_for_elk_to_sync -from .const import CONF_AUTO_CONFIGURE -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_AUTO_CONFIGURE, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/enocean/config_flow.py b/homeassistant/components/enocean/config_flow.py index 7fce66d54e5..3f4309e3507 100644 --- a/homeassistant/components/enocean/config_flow.py +++ b/homeassistant/components/enocean/config_flow.py @@ -7,8 +7,7 @@ from homeassistant.config_entries import CONN_CLASS_ASSUMED from homeassistant.const import CONF_DEVICE from . import dongle -from .const import DOMAIN # pylint:disable=unused-import -from .const import ERROR_INVALID_DONGLE_PATH, LOGGER +from .const import DOMAIN, ERROR_INVALID_DONGLE_PATH, LOGGER class EnOceanFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/faa_delays/config_flow.py b/homeassistant/components/faa_delays/config_flow.py index 46d917cc92f..b77ab3554b5 100644 --- a/homeassistant/components/faa_delays/config_flow.py +++ b/homeassistant/components/faa_delays/config_flow.py @@ -9,7 +9,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_ID from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/firmata/config_flow.py b/homeassistant/components/firmata/config_flow.py index a86d97e9e2e..e9483998060 100644 --- a/homeassistant/components/firmata/config_flow.py +++ b/homeassistant/components/firmata/config_flow.py @@ -8,7 +8,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_NAME from .board import get_board -from .const import CONF_SERIAL_PORT, DOMAIN # pylint: disable=unused-import +from .const import CONF_SERIAL_PORT, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/flick_electric/config_flow.py b/homeassistant/components/flick_electric/config_flow.py index 2dba50cccca..6956c034d4a 100644 --- a/homeassistant/components/flick_electric/config_flow.py +++ b/homeassistant/components/flick_electric/config_flow.py @@ -16,7 +16,7 @@ from homeassistant.const import ( ) from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/flo/config_flow.py b/homeassistant/components/flo/config_flow.py index 54c6ae94ee2..78899035bfa 100644 --- a/homeassistant/components/flo/config_flow.py +++ b/homeassistant/components/flo/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN, LOGGER # pylint:disable=unused-import +from .const import DOMAIN, LOGGER DATA_SCHEMA = vol.Schema({"username": str, "password": str}) diff --git a/homeassistant/components/flume/config_flow.py b/homeassistant/components/flume/config_flow.py index e0e5bf8efe9..7a028b94eb0 100644 --- a/homeassistant/components/flume/config_flow.py +++ b/homeassistant/components/flume/config_flow.py @@ -14,8 +14,7 @@ from homeassistant.const import ( CONF_USERNAME, ) -from .const import BASE_TOKEN_FILENAME -from .const import DOMAIN # pylint:disable=unused-import +from .const import BASE_TOKEN_FILENAME, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/flunearyou/config_flow.py b/homeassistant/components/flunearyou/config_flow.py index 8bdef58f7e1..5229394b58b 100644 --- a/homeassistant/components/flunearyou/config_flow.py +++ b/homeassistant/components/flunearyou/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE from homeassistant.helpers import aiohttp_client, config_validation as cv -from .const import DOMAIN, LOGGER # pylint: disable=unused-import +from .const import DOMAIN, LOGGER class FluNearYouFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/forked_daapd/config_flow.py b/homeassistant/components/forked_daapd/config_flow.py index c731087d12b..6bcc35f0a52 100644 --- a/homeassistant/components/forked_daapd/config_flow.py +++ b/homeassistant/components/forked_daapd/config_flow.py @@ -10,7 +10,7 @@ from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_PORT from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import ( # pylint:disable=unused-import +from .const import ( CONF_LIBRESPOT_JAVA_PORT, CONF_MAX_PLAYLISTS, CONF_TTS_PAUSE_TIME, diff --git a/homeassistant/components/freebox/config_flow.py b/homeassistant/components/freebox/config_flow.py index f4fde23473f..f2e115ddf9b 100644 --- a/homeassistant/components/freebox/config_flow.py +++ b/homeassistant/components/freebox/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_PORT -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN from .router import get_api _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/fritzbox_callmonitor/config_flow.py b/homeassistant/components/fritzbox_callmonitor/config_flow.py index a08450e20a1..c4d0076a792 100644 --- a/homeassistant/components/fritzbox_callmonitor/config_flow.py +++ b/homeassistant/components/fritzbox_callmonitor/config_flow.py @@ -16,8 +16,6 @@ from homeassistant.const import ( from homeassistant.core import callback from .base import FritzBoxPhonebook - -# pylint:disable=unused-import from .const import ( CONF_PHONEBOOK, CONF_PREFIXES, diff --git a/homeassistant/components/garmin_connect/config_flow.py b/homeassistant/components/garmin_connect/config_flow.py index e0b50fa371b..7cd2309214a 100644 --- a/homeassistant/components/garmin_connect/config_flow.py +++ b/homeassistant/components/garmin_connect/config_flow.py @@ -12,7 +12,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/gdacs/config_flow.py b/homeassistant/components/gdacs/config_flow.py index 1e12a116ed5..b672b56ad9b 100644 --- a/homeassistant/components/gdacs/config_flow.py +++ b/homeassistant/components/gdacs/config_flow.py @@ -12,12 +12,7 @@ from homeassistant.const import ( ) from homeassistant.helpers import config_validation as cv -from .const import ( # pylint: disable=unused-import - CONF_CATEGORIES, - DEFAULT_RADIUS, - DEFAULT_SCAN_INTERVAL, - DOMAIN, -) +from .const import CONF_CATEGORIES, DEFAULT_RADIUS, DEFAULT_SCAN_INTERVAL, DOMAIN DATA_SCHEMA = vol.Schema( {vol.Optional(CONF_RADIUS, default=DEFAULT_RADIUS): cv.positive_int} diff --git a/homeassistant/components/geonetnz_quakes/config_flow.py b/homeassistant/components/geonetnz_quakes/config_flow.py index f3f5829f465..735c6cd6d9f 100644 --- a/homeassistant/components/geonetnz_quakes/config_flow.py +++ b/homeassistant/components/geonetnz_quakes/config_flow.py @@ -12,7 +12,7 @@ from homeassistant.const import ( ) from homeassistant.helpers import config_validation as cv -from .const import ( # pylint: disable=unused-import +from .const import ( CONF_MINIMUM_MAGNITUDE, CONF_MMI, DEFAULT_MINIMUM_MAGNITUDE, diff --git a/homeassistant/components/gios/config_flow.py b/homeassistant/components/gios/config_flow.py index dfef829c479..d2a9f8b73fc 100644 --- a/homeassistant/components/gios/config_flow.py +++ b/homeassistant/components/gios/config_flow.py @@ -10,7 +10,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_NAME from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_STATION_ID, DEFAULT_NAME, DOMAIN # pylint:disable=unused-import +from .const import CONF_STATION_ID, DEFAULT_NAME, DOMAIN DATA_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/goalzero/config_flow.py b/homeassistant/components/goalzero/config_flow.py index 35b6953865c..8a1333d6cf1 100644 --- a/homeassistant/components/goalzero/config_flow.py +++ b/homeassistant/components/goalzero/config_flow.py @@ -8,7 +8,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_NAME from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DEFAULT_NAME, DOMAIN # pylint:disable=unused-import +from .const import DEFAULT_NAME, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/gogogate2/config_flow.py b/homeassistant/components/gogogate2/config_flow.py index 0c3f1b3653c..3ecd3e85c3f 100644 --- a/homeassistant/components/gogogate2/config_flow.py +++ b/homeassistant/components/gogogate2/config_flow.py @@ -16,8 +16,7 @@ from homeassistant.const import ( ) from .common import get_api -from .const import DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE -from .const import DOMAIN # pylint: disable=unused-import +from .const import DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE, DOMAIN class Gogogate2FlowHandler(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/guardian/config_flow.py b/homeassistant/components/guardian/config_flow.py index a9286467afc..d6dcc0614f2 100644 --- a/homeassistant/components/guardian/config_flow.py +++ b/homeassistant/components/guardian/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries, core from homeassistant.const import CONF_IP_ADDRESS, CONF_PORT from homeassistant.core import callback -from .const import CONF_UID, DOMAIN, LOGGER # pylint:disable=unused-import +from .const import CONF_UID, DOMAIN, LOGGER DATA_SCHEMA = vol.Schema( {vol.Required(CONF_IP_ADDRESS): str, vol.Required(CONF_PORT, default=7777): int} diff --git a/homeassistant/components/habitica/config_flow.py b/homeassistant/components/habitica/config_flow.py index 3a77aa3a5b6..051c15d1715 100644 --- a/homeassistant/components/habitica/config_flow.py +++ b/homeassistant/components/habitica/config_flow.py @@ -11,7 +11,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_API_KEY, CONF_NAME, CONF_URL from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_API_USER, DEFAULT_URL, DOMAIN # pylint: disable=unused-import +from .const import CONF_API_USER, DEFAULT_URL, DOMAIN DATA_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/hive/config_flow.py b/homeassistant/components/hive/config_flow.py index ff58e8d96df..b00ba57a96e 100644 --- a/homeassistant/components/hive/config_flow.py +++ b/homeassistant/components/hive/config_flow.py @@ -13,11 +13,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME from homeassistant.core import callback -from .const import ( # pylint:disable=unused-import - CONF_CODE, - CONFIG_ENTRY_VERSION, - DOMAIN, -) +from .const import CONF_CODE, CONFIG_ENTRY_VERSION, DOMAIN class HiveFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/huawei_lte/config_flow.py b/homeassistant/components/huawei_lte/config_flow.py index 80f44e87319..415e2ea2bc3 100644 --- a/homeassistant/components/huawei_lte/config_flow.py +++ b/homeassistant/components/huawei_lte/config_flow.py @@ -31,10 +31,12 @@ from homeassistant.const import ( ) from homeassistant.core import callback -from .const import CONNECTION_TIMEOUT, DEFAULT_DEVICE_NAME, DEFAULT_NOTIFY_SERVICE_NAME - -# see https://github.com/PyCQA/pylint/issues/3202 about the DOMAIN's pylint issue -from .const import DOMAIN # pylint: disable=unused-import +from .const import ( + CONNECTION_TIMEOUT, + DEFAULT_DEVICE_NAME, + DEFAULT_NOTIFY_SERVICE_NAME, + DOMAIN, +) _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/hue/config_flow.py b/homeassistant/components/hue/config_flow.py index 3c9fabf3c9e..9fd025d7b6a 100644 --- a/homeassistant/components/hue/config_flow.py +++ b/homeassistant/components/hue/config_flow.py @@ -17,7 +17,7 @@ from homeassistant.core import callback from homeassistant.helpers import aiohttp_client from .bridge import authenticate_bridge -from .const import ( # pylint: disable=unused-import +from .const import ( CONF_ALLOW_HUE_GROUPS, CONF_ALLOW_UNREACHABLE, DEFAULT_ALLOW_HUE_GROUPS, diff --git a/homeassistant/components/huisbaasje/config_flow.py b/homeassistant/components/huisbaasje/config_flow.py index c9a4750ade5..c8681c31188 100644 --- a/homeassistant/components/huisbaasje/config_flow.py +++ b/homeassistant/components/huisbaasje/config_flow.py @@ -8,7 +8,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME from homeassistant.data_entry_flow import AbortFlow -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/hunterdouglas_powerview/config_flow.py b/homeassistant/components/hunterdouglas_powerview/config_flow.py index 34ae94e4b88..928c4b4819f 100644 --- a/homeassistant/components/hunterdouglas_powerview/config_flow.py +++ b/homeassistant/components/hunterdouglas_powerview/config_flow.py @@ -10,8 +10,7 @@ from homeassistant.const import CONF_HOST, CONF_NAME from homeassistant.helpers.aiohttp_client import async_get_clientsession from . import async_get_device_info -from .const import DEVICE_NAME, DEVICE_SERIAL_NUMBER, HUB_EXCEPTIONS -from .const import DOMAIN # pylint:disable=unused-import +from .const import DEVICE_NAME, DEVICE_SERIAL_NUMBER, DOMAIN, HUB_EXCEPTIONS _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/hyperion/config_flow.py b/homeassistant/components/hyperion/config_flow.py index d8985fa41c5..7ceedcbf005 100644 --- a/homeassistant/components/hyperion/config_flow.py +++ b/homeassistant/components/hyperion/config_flow.py @@ -31,8 +31,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.typing import ConfigType from . import create_hyperion_client - -# pylint: disable=unused-import from .const import ( CONF_AUTH_ID, CONF_CREATE_TOKEN, diff --git a/homeassistant/components/insteon/config_flow.py b/homeassistant/components/insteon/config_flow.py index 7af396baa1e..d9081c5b45e 100644 --- a/homeassistant/components/insteon/config_flow.py +++ b/homeassistant/components/insteon/config_flow.py @@ -16,7 +16,6 @@ from homeassistant.const import ( from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_send -# pylint: disable=unused-import from .const import ( CONF_HOUSECODE, CONF_HUB_VERSION, diff --git a/homeassistant/components/ipp/config_flow.py b/homeassistant/components/ipp/config_flow.py index d167e79cba5..d2624931ea0 100644 --- a/homeassistant/components/ipp/config_flow.py +++ b/homeassistant/components/ipp/config_flow.py @@ -26,8 +26,7 @@ from homeassistant.const import ( from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import ConfigType, HomeAssistantType -from .const import CONF_BASE_PATH, CONF_SERIAL, CONF_UUID -from .const import DOMAIN # pylint: disable=unused-import +from .const import CONF_BASE_PATH, CONF_SERIAL, CONF_UUID, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/iqvia/config_flow.py b/homeassistant/components/iqvia/config_flow.py index ecd1e3c3c4b..1e90a983e45 100644 --- a/homeassistant/components/iqvia/config_flow.py +++ b/homeassistant/components/iqvia/config_flow.py @@ -6,7 +6,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.helpers import aiohttp_client -from .const import CONF_ZIP_CODE, DOMAIN # pylint:disable=unused-import +from .const import CONF_ZIP_CODE, DOMAIN class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/islamic_prayer_times/config_flow.py b/homeassistant/components/islamic_prayer_times/config_flow.py index 065af0bd611..c496bd66732 100644 --- a/homeassistant/components/islamic_prayer_times/config_flow.py +++ b/homeassistant/components/islamic_prayer_times/config_flow.py @@ -4,7 +4,6 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback -# pylint: disable=unused-import from .const import CALC_METHODS, CONF_CALC_METHOD, DEFAULT_CALC_METHOD, DOMAIN, NAME diff --git a/homeassistant/components/isy994/config_flow.py b/homeassistant/components/isy994/config_flow.py index 95c8a3664fb..41e91e2ca6b 100644 --- a/homeassistant/components/isy994/config_flow.py +++ b/homeassistant/components/isy994/config_flow.py @@ -22,10 +22,10 @@ from .const import ( DEFAULT_SENSOR_STRING, DEFAULT_TLS_VERSION, DEFAULT_VAR_SENSOR_STRING, + DOMAIN, ISY_URL_POSTFIX, UDN_UUID_PREFIX, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/juicenet/config_flow.py b/homeassistant/components/juicenet/config_flow.py index 5ea7e4f267a..de814be2072 100644 --- a/homeassistant/components/juicenet/config_flow.py +++ b/homeassistant/components/juicenet/config_flow.py @@ -9,7 +9,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_ACCESS_TOKEN from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/kmtronic/config_flow.py b/homeassistant/components/kmtronic/config_flow.py index 736e6a46c11..914c00ae6f2 100644 --- a/homeassistant/components/kmtronic/config_flow.py +++ b/homeassistant/components/kmtronic/config_flow.py @@ -11,8 +11,7 @@ from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback from homeassistant.helpers import aiohttp_client -from .const import CONF_REVERSE -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_REVERSE, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/kodi/config_flow.py b/homeassistant/components/kodi/config_flow.py index 69460a57570..0f5509a4e66 100644 --- a/homeassistant/components/kodi/config_flow.py +++ b/homeassistant/components/kodi/config_flow.py @@ -24,8 +24,8 @@ from .const import ( DEFAULT_SSL, DEFAULT_TIMEOUT, DEFAULT_WS_PORT, + DOMAIN, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/litterrobot/config_flow.py b/homeassistant/components/litterrobot/config_flow.py index 36fc2064abb..67b73ee12d5 100644 --- a/homeassistant/components/litterrobot/config_flow.py +++ b/homeassistant/components/litterrobot/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN from .hub import LitterRobotHub _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/lutron_caseta/config_flow.py b/homeassistant/components/lutron_caseta/config_flow.py index 98b30b886f3..3c5b1e5db97 100644 --- a/homeassistant/components/lutron_caseta/config_flow.py +++ b/homeassistant/components/lutron_caseta/config_flow.py @@ -21,10 +21,10 @@ from .const import ( CONF_CA_CERTS, CONF_CERTFILE, CONF_KEYFILE, + DOMAIN, ERROR_CANNOT_CONNECT, STEP_IMPORT_FAILED, ) -from .const import DOMAIN # pylint: disable=unused-import HOSTNAME = "hostname" diff --git a/homeassistant/components/mazda/config_flow.py b/homeassistant/components/mazda/config_flow.py index ef0f35e4e8e..3c1137b8e80 100644 --- a/homeassistant/components/mazda/config_flow.py +++ b/homeassistant/components/mazda/config_flow.py @@ -13,9 +13,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_REGION from homeassistant.helpers import aiohttp_client -# https://github.com/PyCQA/pylint/issues/3202 -from .const import DOMAIN # pylint: disable=unused-import -from .const import MAZDA_REGIONS +from .const import DOMAIN, MAZDA_REGIONS _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/melcloud/config_flow.py b/homeassistant/components/melcloud/config_flow.py index a487a446d9b..98ba343bfcb 100644 --- a/homeassistant/components/melcloud/config_flow.py +++ b/homeassistant/components/melcloud/config_flow.py @@ -17,7 +17,7 @@ from homeassistant.const import ( HTTP_UNAUTHORIZED, ) -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/meteo_france/config_flow.py b/homeassistant/components/meteo_france/config_flow.py index f4d7c5dccfa..2ea9ed0568c 100644 --- a/homeassistant/components/meteo_france/config_flow.py +++ b/homeassistant/components/meteo_france/config_flow.py @@ -9,8 +9,7 @@ from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_MODE from homeassistant.core import callback -from .const import CONF_CITY, FORECAST_MODE, FORECAST_MODE_DAILY -from .const import DOMAIN # pylint: disable=unused-import +from .const import CONF_CITY, DOMAIN, FORECAST_MODE, FORECAST_MODE_DAILY _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/metoffice/config_flow.py b/homeassistant/components/metoffice/config_flow.py index b71c3de67e3..7dd3788f8b7 100644 --- a/homeassistant/components/metoffice/config_flow.py +++ b/homeassistant/components/metoffice/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from homeassistant.helpers import config_validation as cv -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN from .data import MetOfficeData _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/mill/config_flow.py b/homeassistant/components/mill/config_flow.py index f1b94ab2ac8..dead7a1ff9d 100644 --- a/homeassistant/components/mill/config_flow.py +++ b/homeassistant/components/mill/config_flow.py @@ -6,7 +6,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN DATA_SCHEMA = vol.Schema( {vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str} diff --git a/homeassistant/components/minecraft_server/config_flow.py b/homeassistant/components/minecraft_server/config_flow.py index 8cd26d777eb..b252a712153 100644 --- a/homeassistant/components/minecraft_server/config_flow.py +++ b/homeassistant/components/minecraft_server/config_flow.py @@ -11,12 +11,7 @@ from homeassistant.config_entries import ConfigFlow from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT from . import MinecraftServer, helpers -from .const import ( # pylint: disable=unused-import - DEFAULT_HOST, - DEFAULT_NAME, - DEFAULT_PORT, - DOMAIN, -) +from .const import DEFAULT_HOST, DEFAULT_NAME, DEFAULT_PORT, DOMAIN class MinecraftServerConfigFlow(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/monoprice/config_flow.py b/homeassistant/components/monoprice/config_flow.py index 05158144916..a65fa8d23f3 100644 --- a/homeassistant/components/monoprice/config_flow.py +++ b/homeassistant/components/monoprice/config_flow.py @@ -16,8 +16,8 @@ from .const import ( CONF_SOURCE_5, CONF_SOURCE_6, CONF_SOURCES, + DOMAIN, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/motion_blinds/config_flow.py b/homeassistant/components/motion_blinds/config_flow.py index d2bf216e26a..9aa62ca2d05 100644 --- a/homeassistant/components/motion_blinds/config_flow.py +++ b/homeassistant/components/motion_blinds/config_flow.py @@ -5,7 +5,6 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_API_KEY, CONF_HOST -# pylint: disable=unused-import from .const import DEFAULT_GATEWAY_NAME, DOMAIN from .gateway import ConnectMotionGateway diff --git a/homeassistant/components/myq/config_flow.py b/homeassistant/components/myq/config_flow.py index 352283607d8..17c98195a4e 100644 --- a/homeassistant/components/myq/config_flow.py +++ b/homeassistant/components/myq/config_flow.py @@ -9,7 +9,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/nexia/config_flow.py b/homeassistant/components/nexia/config_flow.py index 87850145077..e68564706fa 100644 --- a/homeassistant/components/nexia/config_flow.py +++ b/homeassistant/components/nexia/config_flow.py @@ -8,7 +8,7 @@ import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN from .util import is_invalid_auth_code _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/nightscout/config_flow.py b/homeassistant/components/nightscout/config_flow.py index 3000d652e46..2b91395d377 100644 --- a/homeassistant/components/nightscout/config_flow.py +++ b/homeassistant/components/nightscout/config_flow.py @@ -9,7 +9,7 @@ import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import CONF_API_KEY, CONF_URL -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN from .utils import hash_from_url _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/notion/config_flow.py b/homeassistant/components/notion/config_flow.py index 86c51e3c13c..425357c3105 100644 --- a/homeassistant/components/notion/config_flow.py +++ b/homeassistant/components/notion/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class NotionFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/nuheat/config_flow.py b/homeassistant/components/nuheat/config_flow.py index 40de3844620..2cbe1105e97 100644 --- a/homeassistant/components/nuheat/config_flow.py +++ b/homeassistant/components/nuheat/config_flow.py @@ -13,8 +13,7 @@ from homeassistant.const import ( HTTP_INTERNAL_SERVER_ERROR, ) -from .const import CONF_SERIAL_NUMBER -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_SERIAL_NUMBER, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/nuki/config_flow.py b/homeassistant/components/nuki/config_flow.py index f065f1c27ef..7d7a846aa80 100644 --- a/homeassistant/components/nuki/config_flow.py +++ b/homeassistant/components/nuki/config_flow.py @@ -10,11 +10,7 @@ from homeassistant import config_entries, exceptions from homeassistant.components.dhcp import HOSTNAME, IP_ADDRESS from homeassistant.const import CONF_HOST, CONF_PORT, CONF_TOKEN -from .const import ( # pylint: disable=unused-import - DEFAULT_PORT, - DEFAULT_TIMEOUT, - DOMAIN, -) +from .const import DEFAULT_PORT, DEFAULT_TIMEOUT, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/nut/config_flow.py b/homeassistant/components/nut/config_flow.py index b6f56192d80..07e135b8ebd 100644 --- a/homeassistant/components/nut/config_flow.py +++ b/homeassistant/components/nut/config_flow.py @@ -22,12 +22,12 @@ from .const import ( DEFAULT_HOST, DEFAULT_PORT, DEFAULT_SCAN_INTERVAL, + DOMAIN, KEY_STATUS, KEY_STATUS_DISPLAY, SENSOR_NAME, SENSOR_TYPES, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/nws/config_flow.py b/homeassistant/components/nws/config_flow.py index 12ab09abaae..cfe43f3a528 100644 --- a/homeassistant/components/nws/config_flow.py +++ b/homeassistant/components/nws/config_flow.py @@ -11,7 +11,7 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession from . import base_unique_id -from .const import CONF_STATION, DOMAIN # pylint:disable=unused-import +from .const import CONF_STATION, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/nzbget/config_flow.py b/homeassistant/components/nzbget/config_flow.py index eb81540e39e..a352c4df6ed 100644 --- a/homeassistant/components/nzbget/config_flow.py +++ b/homeassistant/components/nzbget/config_flow.py @@ -26,8 +26,8 @@ from .const import ( DEFAULT_SCAN_INTERVAL, DEFAULT_SSL, DEFAULT_VERIFY_SSL, + DOMAIN, ) -from .const import DOMAIN # pylint: disable=unused-import from .coordinator import NZBGetAPI, NZBGetAPIException _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/onvif/config_flow.py b/homeassistant/components/onvif/config_flow.py index 9bd6f629459..0de93627953 100644 --- a/homeassistant/components/onvif/config_flow.py +++ b/homeassistant/components/onvif/config_flow.py @@ -22,7 +22,6 @@ from homeassistant.const import ( ) from homeassistant.core import callback -# pylint: disable=unused-import from .const import ( CONF_DEVICE_ID, CONF_RTSP_TRANSPORT, diff --git a/homeassistant/components/openuv/config_flow.py b/homeassistant/components/openuv/config_flow.py index 9dfb053ff01..172b0ed3c44 100644 --- a/homeassistant/components/openuv/config_flow.py +++ b/homeassistant/components/openuv/config_flow.py @@ -12,7 +12,7 @@ from homeassistant.const import ( ) from homeassistant.helpers import aiohttp_client, config_validation as cv -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN CONFIG_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/openweathermap/config_flow.py b/homeassistant/components/openweathermap/config_flow.py index 2c2070141d5..7be4fe795ac 100644 --- a/homeassistant/components/openweathermap/config_flow.py +++ b/homeassistant/components/openweathermap/config_flow.py @@ -20,10 +20,10 @@ from .const import ( DEFAULT_FORECAST_MODE, DEFAULT_LANGUAGE, DEFAULT_NAME, + DOMAIN, FORECAST_MODES, LANGUAGES, ) -from .const import DOMAIN # pylint:disable=unused-import class OpenWeatherMapConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/ovo_energy/config_flow.py b/homeassistant/components/ovo_energy/config_flow.py index 0b2f7aac2d0..f65b8007ecb 100644 --- a/homeassistant/components/ovo_energy/config_flow.py +++ b/homeassistant/components/ovo_energy/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries from homeassistant.config_entries import ConfigFlow from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN REAUTH_SCHEMA = vol.Schema({vol.Required(CONF_PASSWORD): str}) USER_SCHEMA = vol.Schema( diff --git a/homeassistant/components/owntracks/config_flow.py b/homeassistant/components/owntracks/config_flow.py index 2e588ff933a..7074312594a 100644 --- a/homeassistant/components/owntracks/config_flow.py +++ b/homeassistant/components/owntracks/config_flow.py @@ -4,7 +4,7 @@ import secrets from homeassistant import config_entries from homeassistant.const import CONF_WEBHOOK_ID -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN from .helper import supports_encryption CONF_SECRET = "secret" diff --git a/homeassistant/components/panasonic_viera/config_flow.py b/homeassistant/components/panasonic_viera/config_flow.py index b39d3a1d3c8..50a030b91da 100644 --- a/homeassistant/components/panasonic_viera/config_flow.py +++ b/homeassistant/components/panasonic_viera/config_flow.py @@ -9,7 +9,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PIN, CONF_PORT -from .const import ( # pylint: disable=unused-import +from .const import ( ATTR_DEVICE_INFO, ATTR_FRIENDLY_NAME, ATTR_UDN, diff --git a/homeassistant/components/philips_js/config_flow.py b/homeassistant/components/philips_js/config_flow.py index 7b06558f3fe..8f0bcd161fc 100644 --- a/homeassistant/components/philips_js/config_flow.py +++ b/homeassistant/components/philips_js/config_flow.py @@ -17,12 +17,7 @@ from homeassistant.const import ( ) from . import LOGGER -from .const import ( # pylint:disable=unused-import - CONF_SYSTEM, - CONST_APP_ID, - CONST_APP_NAME, - DOMAIN, -) +from .const import CONF_SYSTEM, CONST_APP_ID, CONST_APP_NAME, DOMAIN async def validate_input( diff --git a/homeassistant/components/pi_hole/config_flow.py b/homeassistant/components/pi_hole/config_flow.py index a7d4b387b1c..60d53c4f904 100644 --- a/homeassistant/components/pi_hole/config_flow.py +++ b/homeassistant/components/pi_hole/config_flow.py @@ -6,7 +6,7 @@ from hole.exceptions import HoleError import voluptuous as vol from homeassistant import config_entries -from homeassistant.components.pi_hole.const import ( # pylint: disable=unused-import +from homeassistant.components.pi_hole.const import ( CONF_LOCATION, CONF_STATISTICS_ONLY, DEFAULT_LOCATION, diff --git a/homeassistant/components/plaato/config_flow.py b/homeassistant/components/plaato/config_flow.py index 8dbf6d50fca..2cb1f4ce326 100644 --- a/homeassistant/components/plaato/config_flow.py +++ b/homeassistant/components/plaato/config_flow.py @@ -17,12 +17,12 @@ from .const import ( CONF_USE_WEBHOOK, DEFAULT_SCAN_INTERVAL, DOCS_URL, + DOMAIN, PLACEHOLDER_DEVICE_NAME, PLACEHOLDER_DEVICE_TYPE, PLACEHOLDER_DOCS_URL, PLACEHOLDER_WEBHOOK_URL, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__package__) diff --git a/homeassistant/components/plum_lightpad/config_flow.py b/homeassistant/components/plum_lightpad/config_flow.py index 561f071bc7b..40432810cc5 100644 --- a/homeassistant/components/plum_lightpad/config_flow.py +++ b/homeassistant/components/plum_lightpad/config_flow.py @@ -12,7 +12,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers.typing import ConfigType -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN from .utils import load_plum _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/poolsense/config_flow.py b/homeassistant/components/poolsense/config_flow.py index b9c73ace3fc..653ba026ebf 100644 --- a/homeassistant/components/poolsense/config_flow.py +++ b/homeassistant/components/poolsense/config_flow.py @@ -8,7 +8,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/powerwall/config_flow.py b/homeassistant/components/powerwall/config_flow.py index eb804df3420..579c916a15a 100644 --- a/homeassistant/components/powerwall/config_flow.py +++ b/homeassistant/components/powerwall/config_flow.py @@ -14,7 +14,7 @@ from homeassistant.components.dhcp import IP_ADDRESS from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD from homeassistant.core import callback -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/profiler/config_flow.py b/homeassistant/components/profiler/config_flow.py index 9a71b64a179..259c300239c 100644 --- a/homeassistant/components/profiler/config_flow.py +++ b/homeassistant/components/profiler/config_flow.py @@ -3,8 +3,7 @@ import voluptuous as vol from homeassistant import config_entries -from .const import DEFAULT_NAME -from .const import DOMAIN # pylint: disable=unused-import +from .const import DEFAULT_NAME, DOMAIN class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/rachio/config_flow.py b/homeassistant/components/rachio/config_flow.py index 63e5bd56954..5719dd81066 100644 --- a/homeassistant/components/rachio/config_flow.py +++ b/homeassistant/components/rachio/config_flow.py @@ -12,11 +12,11 @@ from homeassistant.core import callback from .const import ( CONF_MANUAL_RUN_MINS, DEFAULT_MANUAL_RUN_MINS, + DOMAIN, KEY_ID, KEY_STATUS, KEY_USERNAME, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/rainmachine/config_flow.py b/homeassistant/components/rainmachine/config_flow.py index 80540491ee7..e076a105576 100644 --- a/homeassistant/components/rainmachine/config_flow.py +++ b/homeassistant/components/rainmachine/config_flow.py @@ -8,12 +8,7 @@ from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD, CONF_PORT, CONF_ from homeassistant.core import callback from homeassistant.helpers import aiohttp_client, config_validation as cv -from .const import ( # pylint: disable=unused-import - CONF_ZONE_RUN_TIME, - DEFAULT_PORT, - DEFAULT_ZONE_RUN, - DOMAIN, -) +from .const import CONF_ZONE_RUN_TIME, DEFAULT_PORT, DEFAULT_ZONE_RUN, DOMAIN DATA_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/recollect_waste/config_flow.py b/homeassistant/components/recollect_waste/config_flow.py index 37dca6a064e..62b42e2bddf 100644 --- a/homeassistant/components/recollect_waste/config_flow.py +++ b/homeassistant/components/recollect_waste/config_flow.py @@ -10,12 +10,7 @@ from homeassistant.const import CONF_FRIENDLY_NAME from homeassistant.core import callback from homeassistant.helpers import aiohttp_client -from .const import ( # pylint:disable=unused-import - CONF_PLACE_ID, - CONF_SERVICE_ID, - DOMAIN, - LOGGER, -) +from .const import CONF_PLACE_ID, CONF_SERVICE_ID, DOMAIN, LOGGER DATA_SCHEMA = vol.Schema( {vol.Required(CONF_PLACE_ID): str, vol.Required(CONF_SERVICE_ID): str} diff --git a/homeassistant/components/ring/config_flow.py b/homeassistant/components/ring/config_flow.py index 87b2026882c..a23a08b2a54 100644 --- a/homeassistant/components/ring/config_flow.py +++ b/homeassistant/components/ring/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant import config_entries, const, core, exceptions -from . import DOMAIN # pylint: disable=unused-import +from . import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/risco/config_flow.py b/homeassistant/components/risco/config_flow.py index 507e3943f2d..76b6105df01 100644 --- a/homeassistant/components/risco/config_flow.py +++ b/homeassistant/components/risco/config_flow.py @@ -23,9 +23,9 @@ from .const import ( CONF_HA_STATES_TO_RISCO, CONF_RISCO_STATES_TO_HA, DEFAULT_OPTIONS, + DOMAIN, RISCO_STATES, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/rituals_perfume_genie/config_flow.py b/homeassistant/components/rituals_perfume_genie/config_flow.py index 59e442df538..7bd75cdbbc0 100644 --- a/homeassistant/components/rituals_perfume_genie/config_flow.py +++ b/homeassistant/components/rituals_perfume_genie/config_flow.py @@ -9,7 +9,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import ACCOUNT_HASH, DOMAIN # pylint:disable=unused-import +from .const import ACCOUNT_HASH, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/roku/config_flow.py b/homeassistant/components/roku/config_flow.py index 87ccd20cbda..8424850fe6c 100644 --- a/homeassistant/components/roku/config_flow.py +++ b/homeassistant/components/roku/config_flow.py @@ -19,7 +19,7 @@ from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import HomeAssistantType -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN DATA_SCHEMA = vol.Schema({vol.Required(CONF_HOST): str}) diff --git a/homeassistant/components/roomba/config_flow.py b/homeassistant/components/roomba/config_flow.py index bfe84379d8a..de1492bc2d5 100644 --- a/homeassistant/components/roomba/config_flow.py +++ b/homeassistant/components/roomba/config_flow.py @@ -18,9 +18,9 @@ from .const import ( CONF_CONTINUOUS, DEFAULT_CONTINUOUS, DEFAULT_DELAY, + DOMAIN, ROOMBA_SESSION, ) -from .const import DOMAIN # pylint:disable=unused-import ROOMBA_DISCOVERY_LOCK = "roomba_discovery_lock" diff --git a/homeassistant/components/roon/config_flow.py b/homeassistant/components/roon/config_flow.py index c6ed4436981..b1db9e39a25 100644 --- a/homeassistant/components/roon/config_flow.py +++ b/homeassistant/components/roon/config_flow.py @@ -8,7 +8,7 @@ import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_API_KEY, CONF_HOST -from .const import ( # pylint: disable=unused-import +from .const import ( AUTHENTICATE_TIMEOUT, CONF_ROON_ID, DEFAULT_NAME, diff --git a/homeassistant/components/ruckus_unleashed/config_flow.py b/homeassistant/components/ruckus_unleashed/config_flow.py index 098ffba708c..26be0e5bed9 100644 --- a/homeassistant/components/ruckus_unleashed/config_flow.py +++ b/homeassistant/components/ruckus_unleashed/config_flow.py @@ -8,11 +8,7 @@ import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME -from .const import ( # pylint:disable=unused-import - API_SERIAL, - API_SYSTEM_OVERVIEW, - DOMAIN, -) +from .const import API_SERIAL, API_SYSTEM_OVERVIEW, DOMAIN _LOGGER = logging.getLogger(__package__) diff --git a/homeassistant/components/samsungtv/config_flow.py b/homeassistant/components/samsungtv/config_flow.py index 73d0d0b5e93..209b89f541a 100644 --- a/homeassistant/components/samsungtv/config_flow.py +++ b/homeassistant/components/samsungtv/config_flow.py @@ -21,7 +21,6 @@ from homeassistant.const import ( CONF_TOKEN, ) -# pylint:disable=unused-import from .bridge import SamsungTVBridge from .const import ( CONF_MANUFACTURER, diff --git a/homeassistant/components/screenlogic/config_flow.py b/homeassistant/components/screenlogic/config_flow.py index 32a29564844..4f388722117 100644 --- a/homeassistant/components/screenlogic/config_flow.py +++ b/homeassistant/components/screenlogic/config_flow.py @@ -13,8 +13,7 @@ from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.helpers.device_registry import format_mac -from .const import DEFAULT_SCAN_INTERVAL, MIN_SCAN_INTERVAL -from .const import DOMAIN # pylint: disable=unused-import +from .const import DEFAULT_SCAN_INTERVAL, DOMAIN, MIN_SCAN_INTERVAL _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/script/trace.py b/homeassistant/components/script/trace.py index 8183c882d3d..1a7cc01e084 100644 --- a/homeassistant/components/script/trace.py +++ b/homeassistant/components/script/trace.py @@ -30,7 +30,7 @@ def trace_script(hass, item_id, config, context): try: yield trace - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: if item_id: trace.set_error(ex) raise ex diff --git a/homeassistant/components/sense/config_flow.py b/homeassistant/components/sense/config_flow.py index 866c1683b1e..4f88834eaca 100644 --- a/homeassistant/components/sense/config_flow.py +++ b/homeassistant/components/sense/config_flow.py @@ -8,8 +8,7 @@ from homeassistant import config_entries, core from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_TIMEOUT from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import ACTIVE_UPDATE_RATE, DEFAULT_TIMEOUT, SENSE_TIMEOUT_EXCEPTIONS -from .const import DOMAIN # pylint:disable=unused-import; pylint:disable=unused-import +from .const import ACTIVE_UPDATE_RATE, DEFAULT_TIMEOUT, DOMAIN, SENSE_TIMEOUT_EXCEPTIONS _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sentry/config_flow.py b/homeassistant/components/sentry/config_flow.py index 66707c82ec9..b294fa46236 100644 --- a/homeassistant/components/sentry/config_flow.py +++ b/homeassistant/components/sentry/config_flow.py @@ -10,7 +10,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback -from .const import ( # pylint: disable=unused-import +from .const import ( CONF_DSN, CONF_ENVIRONMENT, CONF_EVENT_CUSTOM_COMPONENTS, diff --git a/homeassistant/components/sharkiq/config_flow.py b/homeassistant/components/sharkiq/config_flow.py index 06a25a8de56..046aaee7df5 100644 --- a/homeassistant/components/sharkiq/config_flow.py +++ b/homeassistant/components/sharkiq/config_flow.py @@ -11,7 +11,7 @@ import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import _LOGGER, DOMAIN # pylint:disable=unused-import +from .const import _LOGGER, DOMAIN SHARKIQ_SCHEMA = vol.Schema( {vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str} diff --git a/homeassistant/components/shelly/config_flow.py b/homeassistant/components/shelly/config_flow.py index 0ad95d67833..73c231086ef 100644 --- a/homeassistant/components/shelly/config_flow.py +++ b/homeassistant/components/shelly/config_flow.py @@ -16,8 +16,7 @@ from homeassistant.const import ( ) from homeassistant.helpers import aiohttp_client -from .const import AIOSHELLY_DEVICE_TIMEOUT_SEC -from .const import DOMAIN # pylint:disable=unused-import +from .const import AIOSHELLY_DEVICE_TIMEOUT_SEC, DOMAIN from .utils import get_coap_context, get_device_sleep_period _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/simplisafe/config_flow.py b/homeassistant/components/simplisafe/config_flow.py index f17a2ce2e4c..09e0b96e742 100644 --- a/homeassistant/components/simplisafe/config_flow.py +++ b/homeassistant/components/simplisafe/config_flow.py @@ -13,7 +13,7 @@ from homeassistant.core import callback from homeassistant.helpers import aiohttp_client from . import async_get_client_id -from .const import DOMAIN, LOGGER # pylint: disable=unused-import +from .const import DOMAIN, LOGGER FULL_DATA_SCHEMA = vol.Schema( { diff --git a/homeassistant/components/smart_meter_texas/config_flow.py b/homeassistant/components/smart_meter_texas/config_flow.py index 211957dac9d..9f6df058cc7 100644 --- a/homeassistant/components/smart_meter_texas/config_flow.py +++ b/homeassistant/components/smart_meter_texas/config_flow.py @@ -14,7 +14,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/smarthab/config_flow.py b/homeassistant/components/smarthab/config_flow.py index 68f0460a4cc..9a4ec3ef325 100644 --- a/homeassistant/components/smarthab/config_flow.py +++ b/homeassistant/components/smarthab/config_flow.py @@ -7,7 +7,6 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD -# pylint: disable=unused-import from . import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/smartthings/config_flow.py b/homeassistant/components/smartthings/config_flow.py index e320c335a08..f6cca7e0276 100644 --- a/homeassistant/components/smartthings/config_flow.py +++ b/homeassistant/components/smartthings/config_flow.py @@ -16,7 +16,6 @@ from homeassistant.const import ( ) from homeassistant.helpers.aiohttp_client import async_get_clientsession -# pylint: disable=unused-import from .const import ( APP_OAUTH_CLIENT_NAME, APP_OAUTH_SCOPES, diff --git a/homeassistant/components/smarttub/config_flow.py b/homeassistant/components/smarttub/config_flow.py index 8f3ed17f93a..d3349060a07 100644 --- a/homeassistant/components/smarttub/config_flow.py +++ b/homeassistant/components/smarttub/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN from .controller import SmartTubController DATA_SCHEMA = vol.Schema( diff --git a/homeassistant/components/sms/config_flow.py b/homeassistant/components/sms/config_flow.py index da5db672959..9546fba0773 100644 --- a/homeassistant/components/sms/config_flow.py +++ b/homeassistant/components/sms/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_DEVICE -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN from .gateway import create_sms_gateway _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sonarr/config_flow.py b/homeassistant/components/sonarr/config_flow.py index 5329371bde8..fd7315585dc 100644 --- a/homeassistant/components/sonarr/config_flow.py +++ b/homeassistant/components/sonarr/config_flow.py @@ -29,8 +29,8 @@ from .const import ( DEFAULT_UPCOMING_DAYS, DEFAULT_VERIFY_SSL, DEFAULT_WANTED_MAX_ITEMS, + DOMAIN, ) -from .const import DOMAIN # pylint: disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/songpal/config_flow.py b/homeassistant/components/songpal/config_flow.py index b93a2b10bc0..22f9f0932ed 100644 --- a/homeassistant/components/songpal/config_flow.py +++ b/homeassistant/components/songpal/config_flow.py @@ -12,7 +12,7 @@ from homeassistant.components import ssdp from homeassistant.const import CONF_HOST, CONF_NAME from homeassistant.core import callback -from .const import CONF_ENDPOINT, DOMAIN # pylint: disable=unused-import +from .const import CONF_ENDPOINT, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/squeezebox/config_flow.py b/homeassistant/components/squeezebox/config_flow.py index cadded67bd1..adfa5895b7d 100644 --- a/homeassistant/components/squeezebox/config_flow.py +++ b/homeassistant/components/squeezebox/config_flow.py @@ -15,7 +15,6 @@ from homeassistant.const import ( ) from homeassistant.helpers.aiohttp_client import async_get_clientsession -# pylint: disable=unused-import from .const import DEFAULT_PORT, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/srp_energy/config_flow.py b/homeassistant/components/srp_energy/config_flow.py index b65b93e0108..51b6f80bb33 100644 --- a/homeassistant/components/srp_energy/config_flow.py +++ b/homeassistant/components/srp_energy/config_flow.py @@ -7,11 +7,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_ID, CONF_NAME, CONF_PASSWORD, CONF_USERNAME -from .const import ( # pylint:disable=unused-import - CONF_IS_TOU, - DEFAULT_NAME, - SRP_ENERGY_DOMAIN, -) +from .const import CONF_IS_TOU, DEFAULT_NAME, SRP_ENERGY_DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/starline/config_flow.py b/homeassistant/components/starline/config_flow.py index 5e62127cc7a..9f8e0339210 100644 --- a/homeassistant/components/starline/config_flow.py +++ b/homeassistant/components/starline/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant import config_entries, core from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import ( # pylint: disable=unused-import +from .const import ( _LOGGER, CONF_APP_ID, CONF_APP_SECRET, diff --git a/homeassistant/components/subaru/config_flow.py b/homeassistant/components/subaru/config_flow.py index d9d9bdff4e1..91ed8ad4214 100644 --- a/homeassistant/components/subaru/config_flow.py +++ b/homeassistant/components/subaru/config_flow.py @@ -16,7 +16,6 @@ from homeassistant.const import CONF_DEVICE_ID, CONF_PASSWORD, CONF_PIN, CONF_US from homeassistant.core import callback from homeassistant.helpers import aiohttp_client, config_validation as cv -# pylint: disable=unused-import from .const import CONF_COUNTRY, CONF_UPDATE_ENABLED, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/syncthru/config_flow.py b/homeassistant/components/syncthru/config_flow.py index 2c6eb65e4ce..cb0243f98fc 100644 --- a/homeassistant/components/syncthru/config_flow.py +++ b/homeassistant/components/syncthru/config_flow.py @@ -12,7 +12,6 @@ from homeassistant.components import ssdp from homeassistant.const import CONF_NAME, CONF_URL from homeassistant.helpers import aiohttp_client -# pylint: disable=unused-import # for DOMAIN https://github.com/PyCQA/pylint/issues/3202 from .const import DEFAULT_MODEL, DEFAULT_NAME_TEMPLATE, DOMAIN diff --git a/homeassistant/components/synology_dsm/config_flow.py b/homeassistant/components/synology_dsm/config_flow.py index e7b510bb399..b3b26e892a8 100644 --- a/homeassistant/components/synology_dsm/config_flow.py +++ b/homeassistant/components/synology_dsm/config_flow.py @@ -39,8 +39,8 @@ from .const import ( DEFAULT_TIMEOUT, DEFAULT_USE_SSL, DEFAULT_VERIFY_SSL, + DOMAIN, ) -from .const import DOMAIN # pylint: disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/tado/config_flow.py b/homeassistant/components/tado/config_flow.py index 6c1f06b2626..5f97212abf3 100644 --- a/homeassistant/components/tado/config_flow.py +++ b/homeassistant/components/tado/config_flow.py @@ -9,8 +9,7 @@ from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback -from .const import CONF_FALLBACK, UNIQUE_ID -from .const import DOMAIN # pylint:disable=unused-import +from .const import CONF_FALLBACK, DOMAIN, UNIQUE_ID _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/tesla/config_flow.py b/homeassistant/components/tesla/config_flow.py index 8dce5e238ac..5aab5ea3c59 100644 --- a/homeassistant/components/tesla/config_flow.py +++ b/homeassistant/components/tesla/config_flow.py @@ -20,9 +20,9 @@ from .const import ( CONF_WAKE_ON_START, DEFAULT_SCAN_INTERVAL, DEFAULT_WAKE_ON_START, + DOMAIN, MIN_SCAN_INTERVAL, ) -from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/tibber/config_flow.py b/homeassistant/components/tibber/config_flow.py index 8dce1e66a5a..2c498cc2ff5 100644 --- a/homeassistant/components/tibber/config_flow.py +++ b/homeassistant/components/tibber/config_flow.py @@ -9,7 +9,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_ACCESS_TOKEN from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN DATA_SCHEMA = vol.Schema({vol.Required(CONF_ACCESS_TOKEN): str}) diff --git a/homeassistant/components/tile/config_flow.py b/homeassistant/components/tile/config_flow.py index 87f58193e9d..7cc98e7a77f 100644 --- a/homeassistant/components/tile/config_flow.py +++ b/homeassistant/components/tile/config_flow.py @@ -7,7 +7,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import aiohttp_client -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class TileFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/totalconnect/config_flow.py b/homeassistant/components/totalconnect/config_flow.py index 27fa4203a42..122b1ad88b4 100644 --- a/homeassistant/components/totalconnect/config_flow.py +++ b/homeassistant/components/totalconnect/config_flow.py @@ -5,7 +5,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import CONF_USERCODES, DOMAIN # pylint: disable=unused-import +from .const import CONF_USERCODES, DOMAIN CONF_LOCATION = "location" diff --git a/homeassistant/components/twentemilieu/config_flow.py b/homeassistant/components/twentemilieu/config_flow.py index 769d24e334a..25cdd57b26d 100644 --- a/homeassistant/components/twentemilieu/config_flow.py +++ b/homeassistant/components/twentemilieu/config_flow.py @@ -15,8 +15,7 @@ from homeassistant.config_entries import ConfigFlow from homeassistant.const import CONF_ID from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_HOUSE_LETTER, CONF_HOUSE_NUMBER, CONF_POST_CODE -from .const import DOMAIN # pylint: disable=unused-import +from .const import CONF_HOUSE_LETTER, CONF_HOUSE_NUMBER, CONF_POST_CODE, DOMAIN class TwenteMilieuFlowHandler(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/twinkly/config_flow.py b/homeassistant/components/twinkly/config_flow.py index f1593de5643..0a9adf76e0e 100644 --- a/homeassistant/components/twinkly/config_flow.py +++ b/homeassistant/components/twinkly/config_flow.py @@ -18,11 +18,9 @@ from .const import ( DEV_ID, DEV_MODEL, DEV_NAME, + DOMAIN, ) -# https://github.com/PyCQA/pylint/issues/3202 -from .const import DOMAIN # pylint: disable=unused-import - _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/upb/config_flow.py b/homeassistant/components/upb/config_flow.py index 70a1cddefc3..c1fa31ea467 100644 --- a/homeassistant/components/upb/config_flow.py +++ b/homeassistant/components/upb/config_flow.py @@ -11,7 +11,7 @@ import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import CONF_ADDRESS, CONF_FILE_PATH, CONF_HOST, CONF_PROTOCOL -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) PROTOCOL_MAP = {"TCP": "tcp://", "Serial port": "serial://"} diff --git a/homeassistant/components/upcloud/config_flow.py b/homeassistant/components/upcloud/config_flow.py index d7f1680c80f..1a39b189897 100644 --- a/homeassistant/components/upcloud/config_flow.py +++ b/homeassistant/components/upcloud/config_flow.py @@ -10,7 +10,6 @@ from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME from homeassistant.core import callback -# pylint: disable=unused-import # for DOMAIN https://github.com/PyCQA/pylint/issues/3202 from .const import DEFAULT_SCAN_INTERVAL, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/verisure/config_flow.py b/homeassistant/components/verisure/config_flow.py index f05571d338c..25560b62b16 100644 --- a/homeassistant/components/verisure/config_flow.py +++ b/homeassistant/components/verisure/config_flow.py @@ -20,7 +20,7 @@ from homeassistant.config_entries import ( from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.core import callback -from .const import ( # pylint:disable=unused-import +from .const import ( CONF_GIID, CONF_LOCK_CODE_DIGITS, CONF_LOCK_DEFAULT_CODE, diff --git a/homeassistant/components/vicare/__init__.py b/homeassistant/components/vicare/__init__.py index 3c8dfe948d0..3475361bfdf 100644 --- a/homeassistant/components/vicare/__init__.py +++ b/homeassistant/components/vicare/__init__.py @@ -33,7 +33,6 @@ DEFAULT_HEATING_TYPE = "generic" class HeatingType(enum.Enum): - # pylint: disable=invalid-name """Possible options for heating type.""" generic = "generic" diff --git a/homeassistant/components/vilfo/config_flow.py b/homeassistant/components/vilfo/config_flow.py index 2b9df3d9195..d5646c8caf3 100644 --- a/homeassistant/components/vilfo/config_flow.py +++ b/homeassistant/components/vilfo/config_flow.py @@ -13,8 +13,7 @@ import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST, CONF_ID, CONF_MAC -from .const import DOMAIN # pylint:disable=unused-import -from .const import ROUTER_DEFAULT_HOST +from .const import DOMAIN, ROUTER_DEFAULT_HOST _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/volumio/config_flow.py b/homeassistant/components/volumio/config_flow.py index a0ed860f061..80ec2f05d91 100644 --- a/homeassistant/components/volumio/config_flow.py +++ b/homeassistant/components/volumio/config_flow.py @@ -12,7 +12,7 @@ from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import DiscoveryInfoType -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/wiffi/config_flow.py b/homeassistant/components/wiffi/config_flow.py index f30ee8792df..768f66bf8de 100644 --- a/homeassistant/components/wiffi/config_flow.py +++ b/homeassistant/components/wiffi/config_flow.py @@ -11,11 +11,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_PORT, CONF_TIMEOUT from homeassistant.core import callback -from .const import ( # pylint: disable=unused-import - DEFAULT_PORT, - DEFAULT_TIMEOUT, - DOMAIN, -) +from .const import DEFAULT_PORT, DEFAULT_TIMEOUT, DOMAIN class WiffiFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/wilight/config_flow.py b/homeassistant/components/wilight/config_flow.py index 32c66df65a7..2706db07871 100644 --- a/homeassistant/components/wilight/config_flow.py +++ b/homeassistant/components/wilight/config_flow.py @@ -7,7 +7,7 @@ from homeassistant.components import ssdp from homeassistant.config_entries import CONN_CLASS_LOCAL_PUSH, ConfigFlow from homeassistant.const import CONF_HOST -from . import DOMAIN # pylint: disable=unused-import +from . import DOMAIN CONF_SERIAL_NUMBER = "serial_number" CONF_MODEL_NAME = "model_name" diff --git a/homeassistant/components/wled/config_flow.py b/homeassistant/components/wled/config_flow.py index 75e59c88086..a85a74fa94b 100644 --- a/homeassistant/components/wled/config_flow.py +++ b/homeassistant/components/wled/config_flow.py @@ -15,7 +15,7 @@ from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import ConfigType -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class WLEDFlowHandler(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/wolflink/config_flow.py b/homeassistant/components/wolflink/config_flow.py index f54789cef78..20dbd8ef9b7 100644 --- a/homeassistant/components/wolflink/config_flow.py +++ b/homeassistant/components/wolflink/config_flow.py @@ -9,12 +9,7 @@ from wolf_smartset.wolf_client import WolfClient from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from .const import ( # pylint:disable=unused-import - DEVICE_GATEWAY, - DEVICE_ID, - DEVICE_NAME, - DOMAIN, -) +from .const import DEVICE_GATEWAY, DEVICE_ID, DEVICE_NAME, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/xiaomi_aqara/config_flow.py b/homeassistant/components/xiaomi_aqara/config_flow.py index 8028d16f86a..c080aec508d 100644 --- a/homeassistant/components/xiaomi_aqara/config_flow.py +++ b/homeassistant/components/xiaomi_aqara/config_flow.py @@ -10,7 +10,6 @@ from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, CONF_PORT, CONF_ from homeassistant.core import callback from homeassistant.helpers.device_registry import format_mac -# pylint: disable=unused-import from .const import ( CONF_INTERFACE, CONF_KEY, diff --git a/homeassistant/components/xiaomi_miio/config_flow.py b/homeassistant/components/xiaomi_miio/config_flow.py index 12e299879b2..9320972abcb 100644 --- a/homeassistant/components/xiaomi_miio/config_flow.py +++ b/homeassistant/components/xiaomi_miio/config_flow.py @@ -8,7 +8,6 @@ from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN from homeassistant.helpers.device_registry import format_mac -# pylint: disable=unused-import from .const import ( CONF_DEVICE, CONF_FLOW_TYPE, diff --git a/homeassistant/components/yeelight/config_flow.py b/homeassistant/components/yeelight/config_flow.py index f186c897a21..0473cc1042c 100644 --- a/homeassistant/components/yeelight/config_flow.py +++ b/homeassistant/components/yeelight/config_flow.py @@ -16,10 +16,10 @@ from . import ( CONF_NIGHTLIGHT_SWITCH_TYPE, CONF_SAVE_ON_CHANGE, CONF_TRANSITION, + DOMAIN, NIGHTLIGHT_SWITCH_TYPE_LIGHT, _async_unique_name, ) -from . import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/zha/config_flow.py b/homeassistant/components/zha/config_flow.py index 9835a9a3937..7994ebb5f25 100644 --- a/homeassistant/components/zha/config_flow.py +++ b/homeassistant/components/zha/config_flow.py @@ -10,7 +10,7 @@ from zigpy.config import CONF_DEVICE, CONF_DEVICE_PATH from homeassistant import config_entries -from .core.const import ( # pylint:disable=unused-import +from .core.const import ( CONF_BAUDRATE, CONF_FLOWCONTROL, CONF_RADIO_TYPE, diff --git a/homeassistant/components/zha/core/const.py b/homeassistant/components/zha/core/const.py index ed45400861a..2c968a5f02d 100644 --- a/homeassistant/components/zha/core/const.py +++ b/homeassistant/components/zha/core/const.py @@ -178,7 +178,6 @@ PRESET_COMPLEX = "complex" class RadioType(enum.Enum): - # pylint: disable=invalid-name """Possible options for radio type.""" znp = ( diff --git a/homeassistant/components/zone/config_flow.py b/homeassistant/components/zone/config_flow.py index a778d71d2e5..de163146ab7 100644 --- a/homeassistant/components/zone/config_flow.py +++ b/homeassistant/components/zone/config_flow.py @@ -6,7 +6,7 @@ migrated to the storage collection. """ from homeassistant import config_entries -from .const import DOMAIN # pylint: disable=unused-import +from .const import DOMAIN class ZoneConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/zwave_js/config_flow.py b/homeassistant/components/zwave_js/config_flow.py index 75e948004cb..313f4e146a5 100644 --- a/homeassistant/components/zwave_js/config_flow.py +++ b/homeassistant/components/zwave_js/config_flow.py @@ -18,7 +18,7 @@ from homeassistant.data_entry_flow import AbortFlow from homeassistant.helpers.aiohttp_client import async_get_clientsession from .addon import AddonError, AddonManager, get_addon_manager -from .const import ( # pylint:disable=unused-import +from .const import ( CONF_ADDON_DEVICE, CONF_ADDON_NETWORK_KEY, CONF_INTEGRATION_CREATED_ADDON, diff --git a/homeassistant/core.py b/homeassistant/core.py index debbbeeb263..fdf2a093928 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -150,7 +150,6 @@ def is_callback(func: Callable[..., Any]) -> bool: @enum.unique class HassJobType(enum.Enum): - # pylint: disable=invalid-name """Represent a job type.""" Coroutinefunction = 1 @@ -196,7 +195,6 @@ def _get_callable_job_type(target: Callable) -> HassJobType: class CoreState(enum.Enum): - # pylint: disable=invalid-name """Represent the current state of Home Assistant.""" not_running = "NOT_RUNNING" @@ -586,7 +584,6 @@ class Context: class EventOrigin(enum.Enum): - # pylint: disable=invalid-name """Represent the origin of an event.""" local = "LOCAL" diff --git a/homeassistant/helpers/condition.py b/homeassistant/helpers/condition.py index ac2fa91afe6..6adcb4d1fd9 100644 --- a/homeassistant/helpers/condition.py +++ b/homeassistant/helpers/condition.py @@ -103,7 +103,7 @@ def trace_condition(variables: TemplateVarsType) -> Generator: trace_stack_push(trace_stack_cv, trace_element) try: yield trace_element - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: trace_element.set_error(ex) raise ex finally: diff --git a/homeassistant/helpers/httpx_client.py b/homeassistant/helpers/httpx_client.py index eb75358e19f..cc4f5be47d8 100644 --- a/homeassistant/helpers/httpx_client.py +++ b/homeassistant/helpers/httpx_client.py @@ -43,7 +43,7 @@ class HassHttpXAsyncClient(httpx.AsyncClient): """Prevent an integration from reopen of the client via context manager.""" return self - async def __aexit__(self, *args: Any) -> None: # pylint: disable=signature-differs + async def __aexit__(self, *args: Any) -> None: """Prevent an integration from close of the client via context manager.""" diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index aa092ea2c8c..7396925db39 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -187,7 +187,7 @@ async def trace_action(hass, script_run, stop, variables): try: yield trace_element - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: trace_element.set_error(ex) raise ex finally: diff --git a/homeassistant/helpers/selector.py b/homeassistant/helpers/selector.py index 6de8c58d279..99d871fc25b 100644 --- a/homeassistant/helpers/selector.py +++ b/homeassistant/helpers/selector.py @@ -70,9 +70,7 @@ class DeviceSelector(Selector): # Model of device vol.Optional("model"): str, # Device has to contain entities matching this selector - vol.Optional( - "entity" - ): EntitySelector.CONFIG_SCHEMA, # pylint: disable=no-member + vol.Optional("entity"): EntitySelector.CONFIG_SCHEMA, } ) diff --git a/homeassistant/helpers/typing.py b/homeassistant/helpers/typing.py index ffc32efeb2a..279bc0f686f 100644 --- a/homeassistant/helpers/typing.py +++ b/homeassistant/helpers/typing.py @@ -20,7 +20,6 @@ QueryType = Any class UndefinedType(Enum): - # pylint: disable=invalid-name """Singleton type for use with not set sentinel values.""" _singleton = 0 diff --git a/pyproject.toml b/pyproject.toml index 80c182cc3b5..217cbebe3b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,7 @@ extension-pkg-whitelist = [ ] [tool.pylint.BASIC] +class-const-naming-style = "any" good-names = [ "_", "ev", diff --git a/requirements_test.txt b/requirements_test.txt index 21930782002..f5ece4782a3 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -10,8 +10,8 @@ jsonpickle==1.4.1 mock-open==1.4.0 mypy==0.812 pre-commit==2.11.1 -pylint==2.7.2 -astroid==2.5.1 +pylint==2.7.3 +astroid==2.5.2 pipdeptree==1.0.0 pylint-strict-informational==0.1 pytest-aiohttp==0.3.0 diff --git a/script/scaffold/templates/config_flow/integration/config_flow.py b/script/scaffold/templates/config_flow/integration/config_flow.py index aa05f633df4..eea7d73b54c 100644 --- a/script/scaffold/templates/config_flow/integration/config_flow.py +++ b/script/scaffold/templates/config_flow/integration/config_flow.py @@ -10,7 +10,7 @@ from homeassistant import config_entries from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__)