diff --git a/homeassistant/components/cast/helpers.py b/homeassistant/components/cast/helpers.py index c6a92c21fb4..8b8862ab318 100644 --- a/homeassistant/components/cast/helpers.py +++ b/homeassistant/components/cast/helpers.py @@ -214,7 +214,7 @@ class CastStatusListener( All following callbacks won't be forwarded. """ - # pylint: disable=protected-access + # pylint: disable-next=protected-access if self._cast_device._cast_info.is_audio_group: self._mz_mgr.remove_multizone(self._uuid) else: diff --git a/homeassistant/components/fritz/common.py b/homeassistant/components/fritz/common.py index 76368175ca0..2abba137fbf 100644 --- a/homeassistant/components/fritz/common.py +++ b/homeassistant/components/fritz/common.py @@ -566,7 +566,7 @@ class FritzBoxTools( self.fritz_hosts.get_mesh_topology ) ): - # pylint: disable=broad-exception-raised + # pylint: disable-next=broad-exception-raised raise Exception("Mesh supported but empty topology reported") except FritzActionError: self.mesh_role = MeshRoles.SLAVE diff --git a/homeassistant/components/geniushub/__init__.py b/homeassistant/components/geniushub/__init__.py index bed622eebf6..955c76fe0fc 100644 --- a/homeassistant/components/geniushub/__init__.py +++ b/homeassistant/components/geniushub/__init__.py @@ -212,11 +212,10 @@ class GeniusBroker: def make_debug_log_entries(self) -> None: """Make any useful debug log entries.""" - # pylint: disable=protected-access _LOGGER.debug( "Raw JSON: \n\nclient._zones = %s \n\nclient._devices = %s", - self.client._zones, - self.client._devices, + self.client._zones, # pylint: disable=protected-access + self.client._devices, # pylint: disable=protected-access ) @@ -309,7 +308,7 @@ class GeniusZone(GeniusEntity): mode = payload["data"][ATTR_ZONE_MODE] - # pylint: disable=protected-access + # pylint: disable-next=protected-access if mode == "footprint" and not self._zone._has_pir: raise TypeError( f"'{self.entity_id}' cannot support footprint mode (it has no PIR)" diff --git a/homeassistant/components/hdmi_cec/__init__.py b/homeassistant/components/hdmi_cec/__init__.py index 459f03edfbb..19621e28d03 100644 --- a/homeassistant/components/hdmi_cec/__init__.py +++ b/homeassistant/components/hdmi_cec/__init__.py @@ -123,11 +123,12 @@ SERVICE_SELECT_DEVICE = "select_device" SERVICE_POWER_ON = "power_on" SERVICE_STANDBY = "standby" -# pylint: disable=unnecessary-lambda DEVICE_SCHEMA: vol.Schema = vol.Schema( { vol.All(cv.positive_int): vol.Any( - lambda devices: DEVICE_SCHEMA(devices), cv.string + # pylint: disable-next=unnecessary-lambda + lambda devices: DEVICE_SCHEMA(devices), + cv.string, ) } ) diff --git a/homeassistant/components/limitlessled/light.py b/homeassistant/components/limitlessled/light.py index 6677768dd00..c1dfeda172c 100644 --- a/homeassistant/components/limitlessled/light.py +++ b/homeassistant/components/limitlessled/light.py @@ -182,20 +182,18 @@ def state(new_state): def wrapper(self: LimitlessLEDGroup, **kwargs: Any) -> None: """Wrap a group state change.""" - # pylint: disable=protected-access - pipeline = Pipeline() transition_time = DEFAULT_TRANSITION if self.effect == EFFECT_COLORLOOP: self.group.stop() - self._attr_effect = None + self._attr_effect = None # pylint: disable=protected-access # Set transition time. if ATTR_TRANSITION in kwargs: transition_time = int(kwargs[ATTR_TRANSITION]) # Do group type-specific work. function(self, transition_time, pipeline, **kwargs) # Update state. - self._attr_is_on = new_state + self._attr_is_on = new_state # pylint: disable=protected-access self.group.enqueue(pipeline) self.schedule_update_ha_state() diff --git a/homeassistant/components/nx584/binary_sensor.py b/homeassistant/components/nx584/binary_sensor.py index 853f5686831..ca55ea25c40 100644 --- a/homeassistant/components/nx584/binary_sensor.py +++ b/homeassistant/components/nx584/binary_sensor.py @@ -131,9 +131,9 @@ class NX584Watcher(threading.Thread): def _process_zone_event(self, event): zone = event["zone"] - # pylint: disable=protected-access if not (zone_sensor := self._zone_sensors.get(zone)): return + # pylint: disable-next=protected-access zone_sensor._zone["state"] = event["zone_state"] zone_sensor.schedule_update_ha_state() diff --git a/homeassistant/components/opentherm_gw/__init__.py b/homeassistant/components/opentherm_gw/__init__.py index 0b8d4693cb8..cd8b98880d5 100644 --- a/homeassistant/components/opentherm_gw/__init__.py +++ b/homeassistant/components/opentherm_gw/__init__.py @@ -163,8 +163,7 @@ def register_services(hass: HomeAssistant) -> None: vol.Required(ATTR_GW_ID): vol.All( cv.string, vol.In(hass.data[DATA_OPENTHERM_GW][DATA_GATEWAYS]) ), - # pylint: disable=unnecessary-lambda - vol.Optional(ATTR_DATE, default=lambda: date.today()): cv.date, + vol.Optional(ATTR_DATE, default=date.today): cv.date, vol.Optional(ATTR_TIME, default=lambda: datetime.now().time()): cv.time, } )