Skip to content

Commit 7231740

Browse files
committed
CRAI suggestion
1 parent 221d624 commit 7231740

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,13 +1292,9 @@ async def _check_for_energy_and_power_features(
12921292
self._mac_in_str,
12931293
states[NodeFeature.ENERGY],
12941294
)
1295-
1296-
remaining_features: tuple[NodeFeature, ...] = ()
1297-
for feature in features:
1298-
if feature in [NodeFeature.ENERGY, NodeFeature.POWER]:
1299-
continue
1300-
remaining_features += (feature,)
1301-
1295+
remaining_features = tuple(
1296+
f for f in features if f not in {NodeFeature.ENERGY, NodeFeature.POWER}
1297+
)
13021298
return remaining_features, states
13031299

13041300
return features, states

0 commit comments

Comments
 (0)