Skip to content

Commit

Permalink
Update pylint to 2.7.3 (#48488)
Browse files Browse the repository at this point in the history
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
  • Loading branch information
cdce8p authored Mar 30, 2021
1 parent 9a75019 commit 2956eb0
Show file tree
Hide file tree
Showing 170 changed files with 163 additions and 288 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/abode/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/accuweather/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/acmeda/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/adguard/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/aemet/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/agent_dvr/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions homeassistant/components/airly/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airnow/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airvisual/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alarmdecoder/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/alexa/intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class SpeechType(enum.Enum):
# pylint: disable=invalid-name
"""The Alexa speech types."""

plaintext = "PlainText"
Expand All @@ -29,7 +28,6 @@ class SpeechType(enum.Enum):


class CardType(enum.Enum):
# pylint: disable=invalid-name
"""The Alexa card types."""

simple = "Simple"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ambient_station/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/apple_tv/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/asuswrt/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/atag/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/august/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 1 addition & 6 deletions homeassistant/components/aurora/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/automation/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/azure_devops/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/bond/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
7 changes: 1 addition & 6 deletions homeassistant/components/broadlink/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/brother/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 1 addition & 5 deletions homeassistant/components/bsblan/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
8 changes: 6 additions & 2 deletions homeassistant/components/canary/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cert_expiry/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/climacell/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/cloudflare/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
8 changes: 6 additions & 2 deletions homeassistant/components/control4/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/coolmaster/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/coronavirus/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/demo/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions homeassistant/components/devolo_home_control/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
9 changes: 1 addition & 8 deletions homeassistant/components/dexcom/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/directv/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/doorbird/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/dsmr/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/dunehd/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
Loading

0 comments on commit 2956eb0

Please sign in to comment.