Remove unnecessary block use of pylint disable in components a-o (#100190)
This commit is contained in:
parent
71207e112e
commit
6b628f2d29
7 changed files with 12 additions and 15 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)"
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue