diff --git a/homeassistant/components/azure_service_bus/notify.py b/homeassistant/components/azure_service_bus/notify.py index 23235a23dff..4005460ecae 100644 --- a/homeassistant/components/azure_service_bus/notify.py +++ b/homeassistant/components/azure_service_bus/notify.py @@ -4,13 +4,8 @@ from __future__ import annotations import json import logging -# pylint: disable-next=no-name-in-module from azure.servicebus import ServiceBusMessage - -# pylint: disable-next=no-name-in-module from azure.servicebus.aio import ServiceBusClient, ServiceBusSender - -# pylint: disable-next=no-name-in-module from azure.servicebus.exceptions import ( MessagingEntityNotFoundError, ServiceBusConnectionError, diff --git a/homeassistant/components/discovergy/__init__.py b/homeassistant/components/discovergy/__init__.py index fe1045203d8..ab892cd9324 100644 --- a/homeassistant/components/discovergy/__init__.py +++ b/homeassistant/components/discovergy/__init__.py @@ -51,7 +51,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: discovergy_data.meters = await discovergy_data.api_client.meters() except discovergyError.InvalidLogin as err: raise ConfigEntryAuthFailed("Invalid email or password") from err - except Exception as err: # pylint: disable=broad-except + except Exception as err: raise ConfigEntryNotReady( "Unexpected error while while getting meters" ) from err diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 68f68d7f558..409b78fb16a 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -318,7 +318,7 @@ class HomeAssistantHTTP: # By default aiohttp does a linear search for routing rules, # we have a lot of routes, so use a dict lookup with a fallback # to the linear search. - self.app._router = FastUrlDispatcher() # pylint: disable=protected-access + self.app._router = FastUrlDispatcher() self.hass = hass self.ssl_certificate = ssl_certificate self.ssl_peer_certificate = ssl_peer_certificate diff --git a/homeassistant/components/huawei_lte/utils.py b/homeassistant/components/huawei_lte/utils.py index ab787a97ea9..172e8658928 100644 --- a/homeassistant/components/huawei_lte/utils.py +++ b/homeassistant/components/huawei_lte/utils.py @@ -21,7 +21,7 @@ def get_device_macs( for x in ("MacAddress1", "MacAddress2", "WifiMacAddrWl0", "WifiMacAddrWl1") ] # Assume not supported when exception is thrown - with suppress(Exception): # pylint: disable=broad-except + with suppress(Exception): macs.extend(x.get("WifiMac") for x in wlan_settings["Ssids"]["Ssid"]) return sorted({format_mac(str(x)) for x in macs if x}) diff --git a/homeassistant/components/integration/sensor.py b/homeassistant/components/integration/sensor.py index ba17a448477..66a99b63681 100644 --- a/homeassistant/components/integration/sensor.py +++ b/homeassistant/components/integration/sensor.py @@ -207,7 +207,6 @@ async def async_setup_platform( async_add_entities([integral]) -# pylint: disable-next=hass-invalid-inheritance # needs fixing class IntegrationSensor(RestoreSensor): """Representation of an integration sensor.""" diff --git a/homeassistant/components/mqtt/models.py b/homeassistant/components/mqtt/models.py index d553274ab3e..8c599469ff2 100644 --- a/homeassistant/components/mqtt/models.py +++ b/homeassistant/components/mqtt/models.py @@ -247,7 +247,7 @@ class MqttValueTemplate: payload, variables=values ) ) - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: _LOGGER.error( "%s: %s rendering template for entity '%s', template: '%s'", type(ex).__name__, @@ -274,7 +274,7 @@ class MqttValueTemplate: payload, default, variables=values ) ) - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: _LOGGER.error( "%s: %s rendering template for entity '%s', template: " "'%s', default value: %s and payload: %s", diff --git a/homeassistant/components/recorder/filters.py b/homeassistant/components/recorder/filters.py index 24d22704a89..bf76c7264d5 100644 --- a/homeassistant/components/recorder/filters.py +++ b/homeassistant/components/recorder/filters.py @@ -187,8 +187,6 @@ class Filters: if self._included_domains or self._included_entity_globs: return or_( i_entities, - # https://github.com/sqlalchemy/sqlalchemy/issues/9190 - # pylint: disable-next=invalid-unary-operand-type (~e_entities & (i_entity_globs | (~e_entity_globs & i_domains))), ).self_group() diff --git a/homeassistant/components/samsungtv/bridge.py b/homeassistant/components/samsungtv/bridge.py index 0cc4dd556d5..03a9c35c9ba 100644 --- a/homeassistant/components/samsungtv/bridge.py +++ b/homeassistant/components/samsungtv/bridge.py @@ -548,7 +548,6 @@ class SamsungTVWSBridge( return RESULT_AUTH_MISSING except (ConnectionFailure, OSError, AsyncioTimeoutError) as err: LOGGER.debug("Failing config: %s, %s error: %s", config, type(err), err) - # pylint: disable-next=useless-else-on-loop else: # noqa: PLW0120 if result: return result diff --git a/homeassistant/components/supla/__init__.py b/homeassistant/components/supla/__init__.py index 14d617ba88e..9652cae4aa4 100644 --- a/homeassistant/components/supla/__init__.py +++ b/homeassistant/components/supla/__init__.py @@ -102,7 +102,6 @@ async def discover_devices(hass, hass_config): async with asyncio.timeout(SCAN_INTERVAL.total_seconds()): channels = { channel["id"]: channel - # pylint: disable-next=cell-var-from-loop for channel in await server.get_channels( # noqa: B023 include=["iodevice", "state", "connected"] )