Re-enabled Ruff E713 (#87301)

pull/87307/head
Franck Nijhof 2023-02-03 16:18:33 +01:00 committed by GitHub
parent 5958e7c515
commit 4b27af6a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -179,7 +179,7 @@ async def async_setup_entry(
for index in range(len(data.ecobee.thermostats)):
thermostat = data.ecobee.get_thermostat(index)
if not thermostat["modelNumber"] in ECOBEE_MODEL_TO_NAME:
if thermostat["modelNumber"] not in ECOBEE_MODEL_TO_NAME:
_LOGGER.error(
(
"Model number for ecobee thermostat %s not recognized. "

View File

@ -96,7 +96,7 @@ class MinutPointBinarySensor(MinutPointEntity, BinarySensorEntity):
return
if self.device_class == BinarySensorDeviceClass.CONNECTIVITY:
# connectivity is the other way around.
self._attr_is_on = not (self._events[0] in self.device.ongoing_events)
self._attr_is_on = self._events[0] not in self.device.ongoing_events
else:
self._attr_is_on = self._events[0] in self.device.ongoing_events
self.async_write_ha_state()

View File

@ -565,8 +565,8 @@ class ZWaveConfigParameterSensor(ZwaveSensorBase):
if (
self._primary_value.configuration_value_type == ConfigurationValueType.RANGE
or (
not str(self.info.primary_value.value)
in self.info.primary_value.metadata.states
str(self.info.primary_value.value)
not in self.info.primary_value.metadata.states
)
):
return str(self.info.primary_value.value)

View File

@ -272,7 +272,6 @@ ignore = [
"D411", # Missing blank line before section
"D418", # Function decorated with `@overload` shouldn't contain a docstring
"E501", # line too long
"E713", # Test for membership should be 'not in'
"E731", # do not assign a lambda expression, use a def
]