Skip to content

Commit b6104e7

Browse files
committed
CRAI suggestion
1 parent f769188 commit b6104e7

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

plugwise_usb/nodes/circle.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,13 +1299,9 @@ async def _check_for_energy_and_power_features(
12991299
self._mac_in_str,
13001300
states[NodeFeature.ENERGY],
13011301
)
1302-
1303-
remaining_features: tuple[NodeFeature, ...] = ()
1304-
for feature in features:
1305-
if feature in [NodeFeature.ENERGY, NodeFeature.POWER]:
1306-
continue
1307-
remaining_features += (feature,)
1308-
1302+
remaining_features = tuple(
1303+
f for f in features if f not in {NodeFeature.ENERGY, NodeFeature.POWER}
1304+
)
13091305
return remaining_features, states
13101306

13111307
return features, states

0 commit comments

Comments
 (0)