From 4b27af6a8f71d0c6ae2b0c87223e83eef226ca66 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 3 Feb 2023 16:18:33 +0100 Subject: [PATCH] Re-enabled Ruff E713 (#87301) --- homeassistant/components/ecobee/climate.py | 2 +- homeassistant/components/point/binary_sensor.py | 2 +- homeassistant/components/zwave_js/sensor.py | 4 ++-- pyproject.toml | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/ecobee/climate.py b/homeassistant/components/ecobee/climate.py index 24609bcd0af..2c2225ff9a8 100644 --- a/homeassistant/components/ecobee/climate.py +++ b/homeassistant/components/ecobee/climate.py @@ -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. " diff --git a/homeassistant/components/point/binary_sensor.py b/homeassistant/components/point/binary_sensor.py index e284f2dbe7f..e8db51fd0fc 100644 --- a/homeassistant/components/point/binary_sensor.py +++ b/homeassistant/components/point/binary_sensor.py @@ -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() diff --git a/homeassistant/components/zwave_js/sensor.py b/homeassistant/components/zwave_js/sensor.py index 0177d694ed4..218617dcf87 100644 --- a/homeassistant/components/zwave_js/sensor.py +++ b/homeassistant/components/zwave_js/sensor.py @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 3fe468e9ffc..95616930ab2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ]