Fix dangerous brackets (#56384)

pull/56388/head
Marc Mueller 2021-09-18 16:08:22 +02:00 committed by GitHub
parent 0a5fdb2e68
commit 811feb69ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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(

View File

@ -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(