From 811feb69bafcdb466a6774da2264b8319cd35d25 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 18 Sep 2021 16:08:22 +0200 Subject: [PATCH] Fix dangerous brackets (#56384) --- homeassistant/components/asuswrt/__init__.py | 2 +- homeassistant/components/asuswrt/router.py | 2 +- homeassistant/components/radiotherm/climate.py | 2 +- homeassistant/components/screenlogic/sensor.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/asuswrt/__init__.py b/homeassistant/components/asuswrt/__init__.py index af7f3b05e33..c87ed85b759 100644 --- a/homeassistant/components/asuswrt/__init__.py +++ b/homeassistant/components/asuswrt/__init__.py @@ -81,7 +81,7 @@ async def async_setup(hass, config): options = {} mode = conf.get(CONF_MODE, MODE_ROUTER) for name, value in conf.items(): - if name in ([CONF_DNSMASQ, CONF_INTERFACE, CONF_REQUIRE_IP]): + if name in [CONF_DNSMASQ, CONF_INTERFACE, CONF_REQUIRE_IP]: if name == CONF_REQUIRE_IP and mode != MODE_AP: continue options[name] = value diff --git a/homeassistant/components/asuswrt/router.py b/homeassistant/components/asuswrt/router.py index 9acea7ba762..5cdcfb834b8 100644 --- a/homeassistant/components/asuswrt/router.py +++ b/homeassistant/components/asuswrt/router.py @@ -373,7 +373,7 @@ class AsusWrtRouter: """Update router options.""" req_reload = False for name, new_opt in new_options.items(): - if name in (CONF_REQ_RELOAD): + if name in CONF_REQ_RELOAD: old_opt = self._options.get(name) if not old_opt or old_opt != new_opt: req_reload = True diff --git a/homeassistant/components/radiotherm/climate.py b/homeassistant/components/radiotherm/climate.py index fc108af56a7..112e9f3a76d 100644 --- a/homeassistant/components/radiotherm/climate.py +++ b/homeassistant/components/radiotherm/climate.py @@ -371,7 +371,7 @@ class RadioThermostat(ClimateEntity): def set_preset_mode(self, preset_mode): """Set Preset mode (Home, Alternate, Away, Holiday).""" - if preset_mode in (PRESET_MODES): + if preset_mode in PRESET_MODES: self.device.program_mode = PRESET_MODE_TO_CODE[preset_mode] else: _LOGGER.error( diff --git a/homeassistant/components/screenlogic/sensor.py b/homeassistant/components/screenlogic/sensor.py index c8e4f84caf0..a35e4c8f7c1 100644 --- a/homeassistant/components/screenlogic/sensor.py +++ b/homeassistant/components/screenlogic/sensor.py @@ -85,7 +85,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): for chem_sensor_name in coordinator.data[SL_DATA.KEY_CHEMISTRY]: enabled = True if equipment_flags & EQUIPMENT.FLAG_CHLORINATOR: - if chem_sensor_name in ("salt_tds_ppm"): + if chem_sensor_name in ("salt_tds_ppm",): enabled = False if chem_sensor_name in SUPPORTED_CHEM_SENSORS: entities.append(