From 009ecfce96f106ab2f6f5ad639d148f065c5e647 Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Tue, 19 Jul 2022 19:52:05 -0700 Subject: [PATCH] use list comprehension --- bumble/host.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bumble/host.py b/bumble/host.py index 27930a2f..fdf09448 100644 --- a/bumble/host.py +++ b/bumble/host.py @@ -259,12 +259,7 @@ class Host(EventEmitter): @property def supported_le_features(self): - features = [] - for bit in range(64): - if self.local_le_features & (1 << bit): - features.append(bit) - - return features + return [feature for feature in range(64) if self.local_le_features & (1 << feature)] # Packet Sink protocol (packets coming from the controller via HCI) def on_packet(self, packet):