Update pylint (#47205)

This commit is contained in:
Marc Mueller
2021-03-01 09:09:01 +01:00
committed by GitHub
parent cb94e7949b
commit 16dcbf1467
20 changed files with 50 additions and 52 deletions

View File

@ -127,7 +127,7 @@ async def async_setup_entry(
if (
device_class == DEVICE_CLASS_MOTION
and device_type is not None
and any([device_type.startswith(t) for t in TYPE_INSTEON_MOTION])
and any(device_type.startswith(t) for t in TYPE_INSTEON_MOTION)
):
# Special cases for Insteon Motion Sensors I & II:
# Some subnodes never report status until activated, so
@ -194,10 +194,8 @@ def _detect_device_type_and_class(node: Union[Group, Node]) -> (str, str):
# Other devices (incl Insteon.)
for device_class in [*BINARY_SENSOR_DEVICE_TYPES_ISY]:
if any(
[
device_type.startswith(t)
for t in set(BINARY_SENSOR_DEVICE_TYPES_ISY[device_class])
]
device_type.startswith(t)
for t in set(BINARY_SENSOR_DEVICE_TYPES_ISY[device_class])
):
return device_class, device_type
return (None, device_type)