From 108917d9d43763ff7b7a49ab5dc1222a7c6a88d5 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 30 Mar 2021 01:47:28 +0200 Subject: [PATCH 1/4] Update pylint to 2.7.3 --- requirements_test.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_test.txt b/requirements_test.txt index 21930782002574..f5ece4782a31d6 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 From b98c614ce6c82eaf0e1d29ec2939ebd4ab717bbe Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 6 Mar 2021 02:44:49 +0100 Subject: [PATCH 2/4] Add class-const-naming-style --- homeassistant/components/alexa/intent.py | 2 -- homeassistant/components/vicare/__init__.py | 1 - homeassistant/components/zha/core/const.py | 1 - homeassistant/core.py | 3 --- homeassistant/helpers/typing.py | 1 - pyproject.toml | 1 + 6 files changed, 1 insertion(+), 8 deletions(-) diff --git a/homeassistant/components/alexa/intent.py b/homeassistant/components/alexa/intent.py index edc7ec6fa987bf..f64031250e258a 100644 --- a/homeassistant/components/alexa/intent.py +++ b/homeassistant/components/alexa/intent.py @@ -18,7 +18,6 @@ class SpeechType(enum.Enum): - # pylint: disable=invalid-name """The Alexa speech types.""" plaintext = "PlainText" @@ -29,7 +28,6 @@ class SpeechType(enum.Enum): class CardType(enum.Enum): - # pylint: disable=invalid-name """The Alexa card types.""" simple = "Simple" diff --git a/homeassistant/components/vicare/__init__.py b/homeassistant/components/vicare/__init__.py index 3c8dfe948d03e0..3475361bfdf72e 100644 --- a/homeassistant/components/vicare/__init__.py +++ b/homeassistant/components/vicare/__init__.py @@ -33,7 +33,6 @@ class HeatingType(enum.Enum): - # pylint: disable=invalid-name """Possible options for heating type.""" generic = "generic" diff --git a/homeassistant/components/zha/core/const.py b/homeassistant/components/zha/core/const.py index ed45400861a367..2c968a5f02d1aa 100644 --- a/homeassistant/components/zha/core/const.py +++ b/homeassistant/components/zha/core/const.py @@ -178,7 +178,6 @@ class RadioType(enum.Enum): - # pylint: disable=invalid-name """Possible options for radio type.""" znp = ( diff --git a/homeassistant/core.py b/homeassistant/core.py index debbbeeb26331a..fdf2a0939283c8 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 @@ def as_dict(self) -> dict[str, str | None]: class EventOrigin(enum.Enum): - # pylint: disable=invalid-name """Represent the origin of an event.""" local = "LOCAL" diff --git a/homeassistant/helpers/typing.py b/homeassistant/helpers/typing.py index ffc32efeb2a111..279bc0f686f82b 100644 --- a/homeassistant/helpers/typing.py +++ b/homeassistant/helpers/typing.py @@ -20,7 +20,6 @@ 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 80c182cc3b5856..217cbebe3b0a6a 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", From e29e036bb74af2bc8980e430e15f9c0f2f13fbcd Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 6 Mar 2021 01:25:33 +0100 Subject: [PATCH 3/4] Remove unused-import message --- homeassistant/components/abode/config_flow.py | 2 +- homeassistant/components/accuweather/config_flow.py | 2 +- homeassistant/components/acmeda/config_flow.py | 2 +- homeassistant/components/adguard/config_flow.py | 2 +- homeassistant/components/aemet/config_flow.py | 3 +-- homeassistant/components/agent_dvr/config_flow.py | 2 +- homeassistant/components/airly/config_flow.py | 6 +----- homeassistant/components/airnow/config_flow.py | 2 +- homeassistant/components/airvisual/config_flow.py | 2 +- homeassistant/components/alarmdecoder/config_flow.py | 2 +- .../components/ambient_station/config_flow.py | 2 +- homeassistant/components/apple_tv/config_flow.py | 3 +-- homeassistant/components/asuswrt/config_flow.py | 2 +- homeassistant/components/atag/config_flow.py | 2 +- homeassistant/components/august/config_flow.py | 3 +-- homeassistant/components/aurora/config_flow.py | 7 +------ homeassistant/components/azure_devops/config_flow.py | 2 +- .../components/bmw_connected_drive/config_flow.py | 2 +- homeassistant/components/bond/config_flow.py | 2 +- homeassistant/components/broadlink/config_flow.py | 7 +------ homeassistant/components/brother/config_flow.py | 2 +- homeassistant/components/bsblan/config_flow.py | 6 +----- homeassistant/components/canary/config_flow.py | 8 ++++++-- homeassistant/components/cert_expiry/config_flow.py | 2 +- homeassistant/components/climacell/config_flow.py | 3 +-- homeassistant/components/cloudflare/config_flow.py | 3 +-- homeassistant/components/control4/config_flow.py | 8 ++++++-- homeassistant/components/coolmaster/config_flow.py | 1 - homeassistant/components/coronavirus/config_flow.py | 2 +- homeassistant/components/demo/config_flow.py | 1 - .../components/devolo_home_control/config_flow.py | 6 +----- homeassistant/components/dexcom/config_flow.py | 9 +-------- homeassistant/components/directv/config_flow.py | 3 +-- homeassistant/components/doorbird/config_flow.py | 3 +-- homeassistant/components/dsmr/config_flow.py | 2 +- homeassistant/components/dunehd/config_flow.py | 2 +- homeassistant/components/eafm/config_flow.py | 1 - homeassistant/components/econet/config_flow.py | 2 +- homeassistant/components/elgato/config_flow.py | 2 +- homeassistant/components/elkm1/config_flow.py | 3 +-- homeassistant/components/enocean/config_flow.py | 3 +-- homeassistant/components/faa_delays/config_flow.py | 2 +- homeassistant/components/firmata/config_flow.py | 2 +- homeassistant/components/flick_electric/config_flow.py | 2 +- homeassistant/components/flo/config_flow.py | 2 +- homeassistant/components/flume/config_flow.py | 3 +-- homeassistant/components/flunearyou/config_flow.py | 2 +- homeassistant/components/forked_daapd/config_flow.py | 2 +- homeassistant/components/freebox/config_flow.py | 2 +- .../components/fritzbox_callmonitor/config_flow.py | 2 -- homeassistant/components/garmin_connect/config_flow.py | 2 +- homeassistant/components/gdacs/config_flow.py | 7 +------ .../components/geonetnz_quakes/config_flow.py | 2 +- homeassistant/components/gios/config_flow.py | 2 +- homeassistant/components/goalzero/config_flow.py | 2 +- homeassistant/components/gogogate2/config_flow.py | 3 +-- homeassistant/components/guardian/config_flow.py | 2 +- homeassistant/components/habitica/config_flow.py | 2 +- homeassistant/components/hive/config_flow.py | 6 +----- homeassistant/components/huawei_lte/config_flow.py | 10 ++++++---- homeassistant/components/hue/config_flow.py | 2 +- homeassistant/components/huisbaasje/config_flow.py | 2 +- .../components/hunterdouglas_powerview/config_flow.py | 3 +-- homeassistant/components/hyperion/config_flow.py | 2 -- homeassistant/components/insteon/config_flow.py | 1 - homeassistant/components/ipp/config_flow.py | 3 +-- homeassistant/components/iqvia/config_flow.py | 2 +- .../components/islamic_prayer_times/config_flow.py | 1 - homeassistant/components/isy994/config_flow.py | 2 +- homeassistant/components/juicenet/config_flow.py | 2 +- homeassistant/components/kmtronic/config_flow.py | 3 +-- homeassistant/components/kodi/config_flow.py | 2 +- homeassistant/components/litterrobot/config_flow.py | 2 +- homeassistant/components/lutron_caseta/config_flow.py | 2 +- homeassistant/components/mazda/config_flow.py | 4 +--- homeassistant/components/melcloud/config_flow.py | 2 +- homeassistant/components/meteo_france/config_flow.py | 3 +-- homeassistant/components/metoffice/config_flow.py | 2 +- homeassistant/components/mill/config_flow.py | 2 +- .../components/minecraft_server/config_flow.py | 7 +------ homeassistant/components/monoprice/config_flow.py | 2 +- homeassistant/components/motion_blinds/config_flow.py | 1 - homeassistant/components/myq/config_flow.py | 2 +- homeassistant/components/nexia/config_flow.py | 2 +- homeassistant/components/nightscout/config_flow.py | 2 +- homeassistant/components/notion/config_flow.py | 2 +- homeassistant/components/nuheat/config_flow.py | 3 +-- homeassistant/components/nuki/config_flow.py | 6 +----- homeassistant/components/nut/config_flow.py | 2 +- homeassistant/components/nws/config_flow.py | 2 +- homeassistant/components/nzbget/config_flow.py | 2 +- homeassistant/components/onvif/config_flow.py | 1 - homeassistant/components/openuv/config_flow.py | 2 +- homeassistant/components/openweathermap/config_flow.py | 2 +- homeassistant/components/ovo_energy/config_flow.py | 2 +- homeassistant/components/owntracks/config_flow.py | 2 +- .../components/panasonic_viera/config_flow.py | 2 +- homeassistant/components/philips_js/config_flow.py | 7 +------ homeassistant/components/pi_hole/config_flow.py | 2 +- homeassistant/components/plaato/config_flow.py | 2 +- homeassistant/components/plum_lightpad/config_flow.py | 2 +- homeassistant/components/poolsense/config_flow.py | 2 +- homeassistant/components/powerwall/config_flow.py | 2 +- homeassistant/components/profiler/config_flow.py | 3 +-- homeassistant/components/rachio/config_flow.py | 2 +- homeassistant/components/rainmachine/config_flow.py | 7 +------ .../components/recollect_waste/config_flow.py | 7 +------ homeassistant/components/ring/config_flow.py | 2 +- homeassistant/components/risco/config_flow.py | 2 +- .../components/rituals_perfume_genie/config_flow.py | 2 +- homeassistant/components/roku/config_flow.py | 2 +- homeassistant/components/roomba/config_flow.py | 2 +- homeassistant/components/roon/config_flow.py | 2 +- .../components/ruckus_unleashed/config_flow.py | 6 +----- homeassistant/components/samsungtv/config_flow.py | 1 - homeassistant/components/screenlogic/config_flow.py | 3 +-- homeassistant/components/sense/config_flow.py | 3 +-- homeassistant/components/sentry/config_flow.py | 2 +- homeassistant/components/sharkiq/config_flow.py | 2 +- homeassistant/components/shelly/config_flow.py | 3 +-- homeassistant/components/simplisafe/config_flow.py | 2 +- .../components/smart_meter_texas/config_flow.py | 2 +- homeassistant/components/smarthab/config_flow.py | 1 - homeassistant/components/smartthings/config_flow.py | 1 - homeassistant/components/smarttub/config_flow.py | 2 +- homeassistant/components/sms/config_flow.py | 2 +- homeassistant/components/sonarr/config_flow.py | 2 +- homeassistant/components/songpal/config_flow.py | 2 +- homeassistant/components/squeezebox/config_flow.py | 1 - homeassistant/components/srp_energy/config_flow.py | 6 +----- homeassistant/components/starline/config_flow.py | 2 +- homeassistant/components/subaru/config_flow.py | 1 - homeassistant/components/syncthru/config_flow.py | 1 - homeassistant/components/synology_dsm/config_flow.py | 2 +- homeassistant/components/tado/config_flow.py | 3 +-- homeassistant/components/tesla/config_flow.py | 2 +- homeassistant/components/tibber/config_flow.py | 2 +- homeassistant/components/tile/config_flow.py | 2 +- homeassistant/components/totalconnect/config_flow.py | 2 +- homeassistant/components/twentemilieu/config_flow.py | 3 +-- homeassistant/components/twinkly/config_flow.py | 4 +--- homeassistant/components/upb/config_flow.py | 2 +- homeassistant/components/upcloud/config_flow.py | 1 - homeassistant/components/verisure/config_flow.py | 2 +- homeassistant/components/vilfo/config_flow.py | 3 +-- homeassistant/components/volumio/config_flow.py | 2 +- homeassistant/components/wiffi/config_flow.py | 6 +----- homeassistant/components/wilight/config_flow.py | 2 +- homeassistant/components/wled/config_flow.py | 2 +- homeassistant/components/wolflink/config_flow.py | 7 +------ homeassistant/components/xiaomi_aqara/config_flow.py | 1 - homeassistant/components/xiaomi_miio/config_flow.py | 1 - homeassistant/components/yeelight/config_flow.py | 2 +- homeassistant/components/zha/config_flow.py | 2 +- homeassistant/components/zone/config_flow.py | 2 +- homeassistant/components/zwave_js/config_flow.py | 2 +- .../templates/config_flow/integration/config_flow.py | 2 +- 157 files changed, 154 insertions(+), 270 deletions(-) diff --git a/homeassistant/components/abode/config_flow.py b/homeassistant/components/abode/config_flow.py index d1e66b3a3dc68f..4e6a6f4c904cbf 100644 --- a/homeassistant/components/abode/config_flow.py +++ b/homeassistant/components/abode/config_flow.py @@ -8,7 +8,7 @@ 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 03d6f40181cef9..6dac2aee286f8a 100644 --- a/homeassistant/components/accuweather/config_flow.py +++ b/homeassistant/components/accuweather/config_flow.py @@ -13,7 +13,7 @@ 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 5cdb804d5ddc7a..70935b7086961b 100644 --- a/homeassistant/components/acmeda/config_flow.py +++ b/homeassistant/components/acmeda/config_flow.py @@ -10,7 +10,7 @@ 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 08650f353b9b2a..d5ec79d788f4a5 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -18,7 +18,7 @@ ) 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 27f389660a8f9c..2e36896c1ebde7 100644 --- a/homeassistant/components/aemet/config_flow.py +++ b/homeassistant/components/aemet/config_flow.py @@ -6,8 +6,7 @@ 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 15ef58ced7ee77..a21e6855337d2c 100644 --- a/homeassistant/components/agent_dvr/config_flow.py +++ b/homeassistant/components/agent_dvr/config_flow.py @@ -7,7 +7,7 @@ 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 d7636d1db335e2..3b1432f77ba406 100644 --- a/homeassistant/components/airly/config_flow.py +++ b/homeassistant/components/airly/config_flow.py @@ -16,11 +16,7 @@ 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 6d53ac133ee4f9..b4de58808da361 100644 --- a/homeassistant/components/airnow/config_flow.py +++ b/homeassistant/components/airnow/config_flow.py @@ -10,7 +10,7 @@ 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 12dec114349e23..128a06b740008e 100644 --- a/homeassistant/components/airvisual/config_flow.py +++ b/homeassistant/components/airvisual/config_flow.py @@ -24,7 +24,7 @@ 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 08c8052c04b4df..137795c684fe8a 100644 --- a/homeassistant/components/alarmdecoder/config_flow.py +++ b/homeassistant/components/alarmdecoder/config_flow.py @@ -11,7 +11,7 @@ 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/ambient_station/config_flow.py b/homeassistant/components/ambient_station/config_flow.py index a4c0a6aa44f241..30548bbe31ba96 100644 --- a/homeassistant/components/ambient_station/config_flow.py +++ b/homeassistant/components/ambient_station/config_flow.py @@ -7,7 +7,7 @@ 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 ad56561ef9b92d..ab4ced1547f2f8 100644 --- a/homeassistant/components/apple_tv/config_flow.py +++ b/homeassistant/components/apple_tv/config_flow.py @@ -21,8 +21,7 @@ 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 94b5fd0f691a26..af778dbe972ea0 100644 --- a/homeassistant/components/asuswrt/config_flow.py +++ b/homeassistant/components/asuswrt/config_flow.py @@ -31,12 +31,12 @@ 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 b1dcedd58dc3cc..20055bd8a9aa22 100644 --- a/homeassistant/components/atag/config_flow.py +++ b/homeassistant/components/atag/config_flow.py @@ -6,7 +6,7 @@ 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 7176592e37efd9..0138b438a1e2d9 100644 --- a/homeassistant/components/august/config_flow.py +++ b/homeassistant/components/august/config_flow.py @@ -7,8 +7,7 @@ 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 24161c059c122b..6e2396d3f5c4d2 100644 --- a/homeassistant/components/aurora/config_flow.py +++ b/homeassistant/components/aurora/config_flow.py @@ -10,12 +10,7 @@ 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/azure_devops/config_flow.py b/homeassistant/components/azure_devops/config_flow.py index d7d6f2868c3183..138ea67e788ea8 100644 --- a/homeassistant/components/azure_devops/config_flow.py +++ b/homeassistant/components/azure_devops/config_flow.py @@ -4,7 +4,7 @@ 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 fbfa20aff1a8ce..7798dc4e7e8e65 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.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 71ad54ee35c75e..763a095787621d 100644 --- a/homeassistant/components/bond/config_flow.py +++ b/homeassistant/components/bond/config_flow.py @@ -17,7 +17,7 @@ ) 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 caf5c0eaaa9451..8f1d1230734424 100644 --- a/homeassistant/components/broadlink/config_flow.py +++ b/homeassistant/components/broadlink/config_flow.py @@ -17,12 +17,7 @@ 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 49f1c0ed1a353a..1d635984b7223f 100644 --- a/homeassistant/components/brother/config_flow.py +++ b/homeassistant/components/brother/config_flow.py @@ -8,7 +8,7 @@ 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 8ea597d238650f..f5df1df043728f 100644 --- a/homeassistant/components/bsblan/config_flow.py +++ b/homeassistant/components/bsblan/config_flow.py @@ -12,11 +12,7 @@ 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 7b6b5b3f322362..2d324e09cc8d64 100644 --- a/homeassistant/components/canary/config_flow.py +++ b/homeassistant/components/canary/config_flow.py @@ -13,8 +13,12 @@ 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 282c87b25c51fa..bfa5f46190b280 100644 --- a/homeassistant/components/cert_expiry/config_flow.py +++ b/homeassistant/components/cert_expiry/config_flow.py @@ -6,7 +6,7 @@ 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 cf3bccd3392416..ebf63abcae4b30 100644 --- a/homeassistant/components/climacell/config_flow.py +++ b/homeassistant/components/climacell/config_flow.py @@ -20,8 +20,7 @@ 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 f530652fe90447..0e3468903af716 100644 --- a/homeassistant/components/cloudflare/config_flow.py +++ b/homeassistant/components/cloudflare/config_flow.py @@ -19,8 +19,7 @@ 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 03183edbfda3ed..1456c440dfa24c 100644 --- a/homeassistant/components/control4/config_flow.py +++ b/homeassistant/components/control4/config_flow.py @@ -19,8 +19,12 @@ 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 7c9b4d5d065b6b..04ee995d25c681 100644 --- a/homeassistant/components/coolmaster/config_flow.py +++ b/homeassistant/components/coolmaster/config_flow.py @@ -6,7 +6,6 @@ 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 ccf2e7f2c75706..6d2776c7ecc5eb 100644 --- a/homeassistant/components/coronavirus/config_flow.py +++ b/homeassistant/components/coronavirus/config_flow.py @@ -4,7 +4,7 @@ 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 35f72e9e0cd6d4..f99693bfeb25f3 100644 --- a/homeassistant/components/demo/config_flow.py +++ b/homeassistant/components/demo/config_flow.py @@ -5,7 +5,6 @@ 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 3f51a9c0884307..d6dbd331d5fec9 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.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 1d6d52fa0c9bc7..0f3aad6f813afd 100644 --- a/homeassistant/components/dexcom/config_flow.py +++ b/homeassistant/components/dexcom/config_flow.py @@ -6,14 +6,7 @@ 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 401ec3b39b69bc..71a8e052c47466 100644 --- a/homeassistant/components/directv/config_flow.py +++ b/homeassistant/components/directv/config_flow.py @@ -18,8 +18,7 @@ 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 4bbd7f8dc86049..1b39bb4a8c349c 100644 --- a/homeassistant/components/doorbird/config_flow.py +++ b/homeassistant/components/doorbird/config_flow.py @@ -17,8 +17,7 @@ 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 95edb87e947187..5a03a80ff5295a 100644 --- a/homeassistant/components/dsmr/config_flow.py +++ b/homeassistant/components/dsmr/config_flow.py @@ -16,7 +16,7 @@ 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 1f0efa668f9784..998ff408f3668d 100644 --- a/homeassistant/components/dunehd/config_flow.py +++ b/homeassistant/components/dunehd/config_flow.py @@ -9,7 +9,7 @@ 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 19b10c3e6c5863..98e9158e2df855 100644 --- a/homeassistant/components/eafm/config_flow.py +++ b/homeassistant/components/eafm/config_flow.py @@ -5,7 +5,6 @@ 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 78aff2eac8ff39..739606088f68f5 100644 --- a/homeassistant/components/econet/config_flow.py +++ b/homeassistant/components/econet/config_flow.py @@ -6,7 +6,7 @@ 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 79960cc95ffbf2..afdbe7e1cdc47f 100644 --- a/homeassistant/components/elgato/config_flow.py +++ b/homeassistant/components/elgato/config_flow.py @@ -11,7 +11,7 @@ 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 b72cfa19335f2d..86117824767525 100644 --- a/homeassistant/components/elkm1/config_flow.py +++ b/homeassistant/components/elkm1/config_flow.py @@ -21,8 +21,7 @@ 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 7fce66d54e5b29..3f4309e3507556 100644 --- a/homeassistant/components/enocean/config_flow.py +++ b/homeassistant/components/enocean/config_flow.py @@ -7,8 +7,7 @@ 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 46d917cc92f667..b77ab3554b56ed 100644 --- a/homeassistant/components/faa_delays/config_flow.py +++ b/homeassistant/components/faa_delays/config_flow.py @@ -9,7 +9,7 @@ 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 a86d97e9e2e9a2..e9483998060619 100644 --- a/homeassistant/components/firmata/config_flow.py +++ b/homeassistant/components/firmata/config_flow.py @@ -8,7 +8,7 @@ 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 2dba50cccca8c2..6956c034d4a5fa 100644 --- a/homeassistant/components/flick_electric/config_flow.py +++ b/homeassistant/components/flick_electric/config_flow.py @@ -16,7 +16,7 @@ ) 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 54c6ae94ee26e9..78899035bfa733 100644 --- a/homeassistant/components/flo/config_flow.py +++ b/homeassistant/components/flo/config_flow.py @@ -7,7 +7,7 @@ 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 e0e5bf8efe9a67..7a028b94eb031b 100644 --- a/homeassistant/components/flume/config_flow.py +++ b/homeassistant/components/flume/config_flow.py @@ -14,8 +14,7 @@ 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 8bdef58f7e1201..5229394b58bd9c 100644 --- a/homeassistant/components/flunearyou/config_flow.py +++ b/homeassistant/components/flunearyou/config_flow.py @@ -7,7 +7,7 @@ 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 c731087d12bcb4..6bcc35f0a525a3 100644 --- a/homeassistant/components/forked_daapd/config_flow.py +++ b/homeassistant/components/forked_daapd/config_flow.py @@ -10,7 +10,7 @@ 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 f4fde23473f149..f2e115ddf9b94c 100644 --- a/homeassistant/components/freebox/config_flow.py +++ b/homeassistant/components/freebox/config_flow.py @@ -7,7 +7,7 @@ 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 a08450e20a1832..c4d0076a792177 100644 --- a/homeassistant/components/fritzbox_callmonitor/config_flow.py +++ b/homeassistant/components/fritzbox_callmonitor/config_flow.py @@ -16,8 +16,6 @@ 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 e0b50fa371bc35..7cd2309214aead 100644 --- a/homeassistant/components/garmin_connect/config_flow.py +++ b/homeassistant/components/garmin_connect/config_flow.py @@ -12,7 +12,7 @@ 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 1e12a116ed5a68..b672b56ad9b9b6 100644 --- a/homeassistant/components/gdacs/config_flow.py +++ b/homeassistant/components/gdacs/config_flow.py @@ -12,12 +12,7 @@ ) 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 f3f5829f465a40..735c6cd6d9fe36 100644 --- a/homeassistant/components/geonetnz_quakes/config_flow.py +++ b/homeassistant/components/geonetnz_quakes/config_flow.py @@ -12,7 +12,7 @@ ) 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 dfef829c479f20..d2a9f8b73fcda4 100644 --- a/homeassistant/components/gios/config_flow.py +++ b/homeassistant/components/gios/config_flow.py @@ -10,7 +10,7 @@ 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 35b6953865c35b..8a1333d6cf137f 100644 --- a/homeassistant/components/goalzero/config_flow.py +++ b/homeassistant/components/goalzero/config_flow.py @@ -8,7 +8,7 @@ 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 0c3f1b3653cac9..3ecd3e85c3f4c5 100644 --- a/homeassistant/components/gogogate2/config_flow.py +++ b/homeassistant/components/gogogate2/config_flow.py @@ -16,8 +16,7 @@ ) 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 a9286467afcf43..d6dcc0614f2f0b 100644 --- a/homeassistant/components/guardian/config_flow.py +++ b/homeassistant/components/guardian/config_flow.py @@ -7,7 +7,7 @@ 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 3a77aa3a5b6276..051c15d17153b7 100644 --- a/homeassistant/components/habitica/config_flow.py +++ b/homeassistant/components/habitica/config_flow.py @@ -11,7 +11,7 @@ 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 ff58e8d96df2fb..b00ba57a96ec88 100644 --- a/homeassistant/components/hive/config_flow.py +++ b/homeassistant/components/hive/config_flow.py @@ -13,11 +13,7 @@ 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 80f44e87319fa9..415e2ea2bc3bde 100644 --- a/homeassistant/components/huawei_lte/config_flow.py +++ b/homeassistant/components/huawei_lte/config_flow.py @@ -31,10 +31,12 @@ ) 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 3c9fabf3c9ee13..9fd025d7b6ad77 100644 --- a/homeassistant/components/hue/config_flow.py +++ b/homeassistant/components/hue/config_flow.py @@ -17,7 +17,7 @@ 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 c9a4750ade5e91..c8681c31188fe5 100644 --- a/homeassistant/components/huisbaasje/config_flow.py +++ b/homeassistant/components/huisbaasje/config_flow.py @@ -8,7 +8,7 @@ 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 34ae94e4b8882a..928c4b4819f467 100644 --- a/homeassistant/components/hunterdouglas_powerview/config_flow.py +++ b/homeassistant/components/hunterdouglas_powerview/config_flow.py @@ -10,8 +10,7 @@ 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 d8985fa41c5b06..7ceedcbf00544a 100644 --- a/homeassistant/components/hyperion/config_flow.py +++ b/homeassistant/components/hyperion/config_flow.py @@ -31,8 +31,6 @@ 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 7af396baa1e0f8..d9081c5b45e5ee 100644 --- a/homeassistant/components/insteon/config_flow.py +++ b/homeassistant/components/insteon/config_flow.py @@ -16,7 +16,6 @@ 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 d167e79cba5db7..d2624931ea0d6f 100644 --- a/homeassistant/components/ipp/config_flow.py +++ b/homeassistant/components/ipp/config_flow.py @@ -26,8 +26,7 @@ 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 ecd1e3c3c4b133..1e90a983e4585c 100644 --- a/homeassistant/components/iqvia/config_flow.py +++ b/homeassistant/components/iqvia/config_flow.py @@ -6,7 +6,7 @@ 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 065af0bd6110f3..c496bd6673209d 100644 --- a/homeassistant/components/islamic_prayer_times/config_flow.py +++ b/homeassistant/components/islamic_prayer_times/config_flow.py @@ -4,7 +4,6 @@ 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 95c8a3664fb676..41e91e2ca6b7e6 100644 --- a/homeassistant/components/isy994/config_flow.py +++ b/homeassistant/components/isy994/config_flow.py @@ -22,10 +22,10 @@ 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 5ea7e4f267ac40..de814be2072eb0 100644 --- a/homeassistant/components/juicenet/config_flow.py +++ b/homeassistant/components/juicenet/config_flow.py @@ -9,7 +9,7 @@ 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 736e6a46c11e95..914c00ae6f2046 100644 --- a/homeassistant/components/kmtronic/config_flow.py +++ b/homeassistant/components/kmtronic/config_flow.py @@ -11,8 +11,7 @@ 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 69460a575707f8..0f5509a4e6639b 100644 --- a/homeassistant/components/kodi/config_flow.py +++ b/homeassistant/components/kodi/config_flow.py @@ -24,8 +24,8 @@ 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 36fc2064abbc33..67b73ee12d544b 100644 --- a/homeassistant/components/litterrobot/config_flow.py +++ b/homeassistant/components/litterrobot/config_flow.py @@ -7,7 +7,7 @@ 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 98b30b886f3c94..3c5b1e5db97679 100644 --- a/homeassistant/components/lutron_caseta/config_flow.py +++ b/homeassistant/components/lutron_caseta/config_flow.py @@ -21,10 +21,10 @@ 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 ef0f35e4e8e8a5..3c1137b8e8053c 100644 --- a/homeassistant/components/mazda/config_flow.py +++ b/homeassistant/components/mazda/config_flow.py @@ -13,9 +13,7 @@ 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 a487a446d9b12e..98ba343bfcb151 100644 --- a/homeassistant/components/melcloud/config_flow.py +++ b/homeassistant/components/melcloud/config_flow.py @@ -17,7 +17,7 @@ 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 f4d7c5dccfae2c..2ea9ed0568cba4 100644 --- a/homeassistant/components/meteo_france/config_flow.py +++ b/homeassistant/components/meteo_france/config_flow.py @@ -9,8 +9,7 @@ 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 b71c3de67e3d00..7dd3788f8b7ef9 100644 --- a/homeassistant/components/metoffice/config_flow.py +++ b/homeassistant/components/metoffice/config_flow.py @@ -7,7 +7,7 @@ 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 f1b94ab2ac8aa9..dead7a1ff9d480 100644 --- a/homeassistant/components/mill/config_flow.py +++ b/homeassistant/components/mill/config_flow.py @@ -6,7 +6,7 @@ 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 8cd26d777eb86a..b252a7121531fa 100644 --- a/homeassistant/components/minecraft_server/config_flow.py +++ b/homeassistant/components/minecraft_server/config_flow.py @@ -11,12 +11,7 @@ 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 0515814491607d..a65fa8d23f36d1 100644 --- a/homeassistant/components/monoprice/config_flow.py +++ b/homeassistant/components/monoprice/config_flow.py @@ -16,8 +16,8 @@ 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 d2bf216e26a7b5..9aa62ca2d05c82 100644 --- a/homeassistant/components/motion_blinds/config_flow.py +++ b/homeassistant/components/motion_blinds/config_flow.py @@ -5,7 +5,6 @@ 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 352283607d819f..17c98195a4ed84 100644 --- a/homeassistant/components/myq/config_flow.py +++ b/homeassistant/components/myq/config_flow.py @@ -9,7 +9,7 @@ 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 87850145077f17..e68564706faf2c 100644 --- a/homeassistant/components/nexia/config_flow.py +++ b/homeassistant/components/nexia/config_flow.py @@ -8,7 +8,7 @@ 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 3000d652e46f87..2b91395d37733f 100644 --- a/homeassistant/components/nightscout/config_flow.py +++ b/homeassistant/components/nightscout/config_flow.py @@ -9,7 +9,7 @@ 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 86c51e3c13c81f..425357c3105c34 100644 --- a/homeassistant/components/notion/config_flow.py +++ b/homeassistant/components/notion/config_flow.py @@ -7,7 +7,7 @@ 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 40de3844620a03..2cbe1105e97e9a 100644 --- a/homeassistant/components/nuheat/config_flow.py +++ b/homeassistant/components/nuheat/config_flow.py @@ -13,8 +13,7 @@ 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 f065f1c27ef7f2..7d7a846aa80d69 100644 --- a/homeassistant/components/nuki/config_flow.py +++ b/homeassistant/components/nuki/config_flow.py @@ -10,11 +10,7 @@ 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 b6f56192d8014e..07e135b8ebdf68 100644 --- a/homeassistant/components/nut/config_flow.py +++ b/homeassistant/components/nut/config_flow.py @@ -22,12 +22,12 @@ 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 12ab09abaae6c6..cfe43f3a528943 100644 --- a/homeassistant/components/nws/config_flow.py +++ b/homeassistant/components/nws/config_flow.py @@ -11,7 +11,7 @@ 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 eb81540e39e7d7..a352c4df6ed471 100644 --- a/homeassistant/components/nzbget/config_flow.py +++ b/homeassistant/components/nzbget/config_flow.py @@ -26,8 +26,8 @@ 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 9bd6f629459584..0de9362795323e 100644 --- a/homeassistant/components/onvif/config_flow.py +++ b/homeassistant/components/onvif/config_flow.py @@ -22,7 +22,6 @@ ) 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 9dfb053ff01b8d..172b0ed3c443a7 100644 --- a/homeassistant/components/openuv/config_flow.py +++ b/homeassistant/components/openuv/config_flow.py @@ -12,7 +12,7 @@ ) 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 2c2070141d51c7..7be4fe795aca1f 100644 --- a/homeassistant/components/openweathermap/config_flow.py +++ b/homeassistant/components/openweathermap/config_flow.py @@ -20,10 +20,10 @@ 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 0b2f7aac2d0dd3..f65b8007ecb3e8 100644 --- a/homeassistant/components/ovo_energy/config_flow.py +++ b/homeassistant/components/ovo_energy/config_flow.py @@ -7,7 +7,7 @@ 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 2e588ff933ab81..7074312594abca 100644 --- a/homeassistant/components/owntracks/config_flow.py +++ b/homeassistant/components/owntracks/config_flow.py @@ -4,7 +4,7 @@ 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 b39d3a1d3c8c6c..50a030b91dadfc 100644 --- a/homeassistant/components/panasonic_viera/config_flow.py +++ b/homeassistant/components/panasonic_viera/config_flow.py @@ -9,7 +9,7 @@ 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 7b06558f3fef02..8f0bcd161fcb81 100644 --- a/homeassistant/components/philips_js/config_flow.py +++ b/homeassistant/components/philips_js/config_flow.py @@ -17,12 +17,7 @@ ) 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 a7d4b387b1c87e..60d53c4f904b89 100644 --- a/homeassistant/components/pi_hole/config_flow.py +++ b/homeassistant/components/pi_hole/config_flow.py @@ -6,7 +6,7 @@ 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 8dbf6d50fca9c9..2cb1f4ce3261b0 100644 --- a/homeassistant/components/plaato/config_flow.py +++ b/homeassistant/components/plaato/config_flow.py @@ -17,12 +17,12 @@ 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 561f071bc7bc33..40432810cc5fa2 100644 --- a/homeassistant/components/plum_lightpad/config_flow.py +++ b/homeassistant/components/plum_lightpad/config_flow.py @@ -12,7 +12,7 @@ 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 b9c73ace3fc32d..653ba026ebf651 100644 --- a/homeassistant/components/poolsense/config_flow.py +++ b/homeassistant/components/poolsense/config_flow.py @@ -8,7 +8,7 @@ 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 eb804df3420f39..579c916a15ada3 100644 --- a/homeassistant/components/powerwall/config_flow.py +++ b/homeassistant/components/powerwall/config_flow.py @@ -14,7 +14,7 @@ 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 9a71b64a1790c1..259c300239cf2e 100644 --- a/homeassistant/components/profiler/config_flow.py +++ b/homeassistant/components/profiler/config_flow.py @@ -3,8 +3,7 @@ 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 63e5bd56954aed..5719dd810660f1 100644 --- a/homeassistant/components/rachio/config_flow.py +++ b/homeassistant/components/rachio/config_flow.py @@ -12,11 +12,11 @@ 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 80540491ee714d..e076a1055766cc 100644 --- a/homeassistant/components/rainmachine/config_flow.py +++ b/homeassistant/components/rainmachine/config_flow.py @@ -8,12 +8,7 @@ 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 37dca6a064ea98..62b42e2bddf6d0 100644 --- a/homeassistant/components/recollect_waste/config_flow.py +++ b/homeassistant/components/recollect_waste/config_flow.py @@ -10,12 +10,7 @@ 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 87b2026882c188..a23a08b2a54099 100644 --- a/homeassistant/components/ring/config_flow.py +++ b/homeassistant/components/ring/config_flow.py @@ -7,7 +7,7 @@ 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 507e3943f2dd0f..76b6105df016fa 100644 --- a/homeassistant/components/risco/config_flow.py +++ b/homeassistant/components/risco/config_flow.py @@ -23,9 +23,9 @@ 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 59e442df538b14..7bd75cdbbc0899 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.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 87ccd20cbda677..8424850fe6c6db 100644 --- a/homeassistant/components/roku/config_flow.py +++ b/homeassistant/components/roku/config_flow.py @@ -19,7 +19,7 @@ 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 bfe84379d8a9cf..de1492bc2d5289 100644 --- a/homeassistant/components/roomba/config_flow.py +++ b/homeassistant/components/roomba/config_flow.py @@ -18,9 +18,9 @@ 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 c6ed443698186c..b1db9e39a25a04 100644 --- a/homeassistant/components/roon/config_flow.py +++ b/homeassistant/components/roon/config_flow.py @@ -8,7 +8,7 @@ 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 098ffba708ccc8..26be0e5bed97a0 100644 --- a/homeassistant/components/ruckus_unleashed/config_flow.py +++ b/homeassistant/components/ruckus_unleashed/config_flow.py @@ -8,11 +8,7 @@ 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 73d0d0b5e93c76..209b89f541af60 100644 --- a/homeassistant/components/samsungtv/config_flow.py +++ b/homeassistant/components/samsungtv/config_flow.py @@ -21,7 +21,6 @@ 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 32a295648445d5..4f388722117129 100644 --- a/homeassistant/components/screenlogic/config_flow.py +++ b/homeassistant/components/screenlogic/config_flow.py @@ -13,8 +13,7 @@ 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/sense/config_flow.py b/homeassistant/components/sense/config_flow.py index 866c1683b1e1e6..4f88834eacad2c 100644 --- a/homeassistant/components/sense/config_flow.py +++ b/homeassistant/components/sense/config_flow.py @@ -8,8 +8,7 @@ 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 66707c82ec94eb..b294fa46236660 100644 --- a/homeassistant/components/sentry/config_flow.py +++ b/homeassistant/components/sentry/config_flow.py @@ -10,7 +10,7 @@ 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 06a25a8de567f6..046aaee7df5117 100644 --- a/homeassistant/components/sharkiq/config_flow.py +++ b/homeassistant/components/sharkiq/config_flow.py @@ -11,7 +11,7 @@ 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 0ad95d67833b5d..73c231086eff5b 100644 --- a/homeassistant/components/shelly/config_flow.py +++ b/homeassistant/components/shelly/config_flow.py @@ -16,8 +16,7 @@ ) 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 f17a2ce2e4cb6b..09e0b96e742109 100644 --- a/homeassistant/components/simplisafe/config_flow.py +++ b/homeassistant/components/simplisafe/config_flow.py @@ -13,7 +13,7 @@ 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 211957dac9dfef..9f6df058cc7fb3 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.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 68f0460a4ccd96..9a4ec3ef3250b4 100644 --- a/homeassistant/components/smarthab/config_flow.py +++ b/homeassistant/components/smarthab/config_flow.py @@ -7,7 +7,6 @@ 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 e320c335a0820b..f6cca7e02763bd 100644 --- a/homeassistant/components/smartthings/config_flow.py +++ b/homeassistant/components/smartthings/config_flow.py @@ -16,7 +16,6 @@ ) 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 8f3ed17f93ac8e..d3349060a07615 100644 --- a/homeassistant/components/smarttub/config_flow.py +++ b/homeassistant/components/smarttub/config_flow.py @@ -7,7 +7,7 @@ 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 da5db672959b41..9546fba07739b0 100644 --- a/homeassistant/components/sms/config_flow.py +++ b/homeassistant/components/sms/config_flow.py @@ -7,7 +7,7 @@ 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 5329371bde8a93..fd7315585dcba5 100644 --- a/homeassistant/components/sonarr/config_flow.py +++ b/homeassistant/components/sonarr/config_flow.py @@ -29,8 +29,8 @@ 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 b93a2b10bc02d9..22f9f0932ed445 100644 --- a/homeassistant/components/songpal/config_flow.py +++ b/homeassistant/components/songpal/config_flow.py @@ -12,7 +12,7 @@ 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 cadded67bd1a81..adfa5895b7d850 100644 --- a/homeassistant/components/squeezebox/config_flow.py +++ b/homeassistant/components/squeezebox/config_flow.py @@ -15,7 +15,6 @@ ) 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 b65b93e0108d8c..51b6f80bb3372e 100644 --- a/homeassistant/components/srp_energy/config_flow.py +++ b/homeassistant/components/srp_energy/config_flow.py @@ -7,11 +7,7 @@ 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 5e62127cc7a97d..9f8e03392103d6 100644 --- a/homeassistant/components/starline/config_flow.py +++ b/homeassistant/components/starline/config_flow.py @@ -7,7 +7,7 @@ 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 d9d9bdff4e1ee2..91ed8ad421418f 100644 --- a/homeassistant/components/subaru/config_flow.py +++ b/homeassistant/components/subaru/config_flow.py @@ -16,7 +16,6 @@ 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 2c6eb65e4ce42c..cb0243f98fcd29 100644 --- a/homeassistant/components/syncthru/config_flow.py +++ b/homeassistant/components/syncthru/config_flow.py @@ -12,7 +12,6 @@ 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 e7b510bb399377..b3b26e892a8800 100644 --- a/homeassistant/components/synology_dsm/config_flow.py +++ b/homeassistant/components/synology_dsm/config_flow.py @@ -39,8 +39,8 @@ 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 6c1f06b2626775..5f97212abf34f3 100644 --- a/homeassistant/components/tado/config_flow.py +++ b/homeassistant/components/tado/config_flow.py @@ -9,8 +9,7 @@ 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 8dce5e238accf6..5aab5ea3c59337 100644 --- a/homeassistant/components/tesla/config_flow.py +++ b/homeassistant/components/tesla/config_flow.py @@ -20,9 +20,9 @@ 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 8dce1e66a5a584..2c498cc2ff55a0 100644 --- a/homeassistant/components/tibber/config_flow.py +++ b/homeassistant/components/tibber/config_flow.py @@ -9,7 +9,7 @@ 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 87f58193e9d595..7cc98e7a77f417 100644 --- a/homeassistant/components/tile/config_flow.py +++ b/homeassistant/components/tile/config_flow.py @@ -7,7 +7,7 @@ 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 27fa4203a42215..122b1ad88b4dd3 100644 --- a/homeassistant/components/totalconnect/config_flow.py +++ b/homeassistant/components/totalconnect/config_flow.py @@ -5,7 +5,7 @@ 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 769d24e334a320..25cdd57b26d8ec 100644 --- a/homeassistant/components/twentemilieu/config_flow.py +++ b/homeassistant/components/twentemilieu/config_flow.py @@ -15,8 +15,7 @@ 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 f1593de5643b1a..0a9adf76e0e456 100644 --- a/homeassistant/components/twinkly/config_flow.py +++ b/homeassistant/components/twinkly/config_flow.py @@ -18,11 +18,9 @@ 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 70a1cddefc37ce..c1fa31ea467c4d 100644 --- a/homeassistant/components/upb/config_flow.py +++ b/homeassistant/components/upb/config_flow.py @@ -11,7 +11,7 @@ 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 d7f1680c80f986..1a39b1898970bd 100644 --- a/homeassistant/components/upcloud/config_flow.py +++ b/homeassistant/components/upcloud/config_flow.py @@ -10,7 +10,6 @@ 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 f05571d338c48f..25560b62b1646c 100644 --- a/homeassistant/components/verisure/config_flow.py +++ b/homeassistant/components/verisure/config_flow.py @@ -20,7 +20,7 @@ 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/vilfo/config_flow.py b/homeassistant/components/vilfo/config_flow.py index 2b9df3d919565e..d5646c8caf3e53 100644 --- a/homeassistant/components/vilfo/config_flow.py +++ b/homeassistant/components/vilfo/config_flow.py @@ -13,8 +13,7 @@ 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 a0ed860f061edd..80ec2f05d91987 100644 --- a/homeassistant/components/volumio/config_flow.py +++ b/homeassistant/components/volumio/config_flow.py @@ -12,7 +12,7 @@ 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 f30ee8792df055..768f66bf8decec 100644 --- a/homeassistant/components/wiffi/config_flow.py +++ b/homeassistant/components/wiffi/config_flow.py @@ -11,11 +11,7 @@ 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 32c66df65a7ba9..2706db07871253 100644 --- a/homeassistant/components/wilight/config_flow.py +++ b/homeassistant/components/wilight/config_flow.py @@ -7,7 +7,7 @@ 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 75e59c880864df..a85a74fa94bc06 100644 --- a/homeassistant/components/wled/config_flow.py +++ b/homeassistant/components/wled/config_flow.py @@ -15,7 +15,7 @@ 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 f54789cef78881..20dbd8ef9b79dd 100644 --- a/homeassistant/components/wolflink/config_flow.py +++ b/homeassistant/components/wolflink/config_flow.py @@ -9,12 +9,7 @@ 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 8028d16f86a2ac..c080aec508dec6 100644 --- a/homeassistant/components/xiaomi_aqara/config_flow.py +++ b/homeassistant/components/xiaomi_aqara/config_flow.py @@ -10,7 +10,6 @@ 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 12e299879b2c02..9320972abcbb14 100644 --- a/homeassistant/components/xiaomi_miio/config_flow.py +++ b/homeassistant/components/xiaomi_miio/config_flow.py @@ -8,7 +8,6 @@ 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 f186c897a212b0..0473cc1042c077 100644 --- a/homeassistant/components/yeelight/config_flow.py +++ b/homeassistant/components/yeelight/config_flow.py @@ -16,10 +16,10 @@ 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 9835a9a393738c..7994ebb5f257b6 100644 --- a/homeassistant/components/zha/config_flow.py +++ b/homeassistant/components/zha/config_flow.py @@ -10,7 +10,7 @@ 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/zone/config_flow.py b/homeassistant/components/zone/config_flow.py index a778d71d2e5822..de163146ab7e8c 100644 --- a/homeassistant/components/zone/config_flow.py +++ b/homeassistant/components/zone/config_flow.py @@ -6,7 +6,7 @@ """ 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 75e948004cb4a8..313f4e146a51e4 100644 --- a/homeassistant/components/zwave_js/config_flow.py +++ b/homeassistant/components/zwave_js/config_flow.py @@ -18,7 +18,7 @@ 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/script/scaffold/templates/config_flow/integration/config_flow.py b/script/scaffold/templates/config_flow/integration/config_flow.py index aa05f633df42aa..eea7d73b54c175 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.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError -from .const import DOMAIN # pylint:disable=unused-import +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) From afa5bf812a90b9ad39642640c8d9fa7751001965 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 28 Mar 2021 22:31:30 +0200 Subject: [PATCH 4/4] Additional cleanup --- homeassistant/components/automation/trace.py | 2 +- homeassistant/components/script/trace.py | 2 +- homeassistant/helpers/condition.py | 2 +- homeassistant/helpers/httpx_client.py | 2 +- homeassistant/helpers/script.py | 2 +- homeassistant/helpers/selector.py | 4 +--- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/automation/trace.py b/homeassistant/components/automation/trace.py index 631d3122e4c8c0..0b335f7d87f8a6 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/script/trace.py b/homeassistant/components/script/trace.py index 8183c882d3df1a..1a7cc01e08471f 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/helpers/condition.py b/homeassistant/helpers/condition.py index ac2fa91afe6412..6adcb4d1fd9752 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 eb75358e19f790..cc4f5be47d8246 100644 --- a/homeassistant/helpers/httpx_client.py +++ b/homeassistant/helpers/httpx_client.py @@ -43,7 +43,7 @@ async def __aenter__(self: HassHttpXAsyncClient) -> HassHttpXAsyncClient: """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 aa092ea2c8ceca..7396925db396fa 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -187,7 +187,7 @@ def async_continue_stop(command=None): 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 6de8c58d279f15..99d871fc25b676 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, } )