From 9584f0419a4f8dce27daf3d0cecef2f9d18ae9ab Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Sun, 26 Nov 2023 19:26:42 +0800 Subject: [PATCH] Provide IntFlag.name property fallback --- bumble/hci.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bumble/hci.py b/bumble/hci.py index 7a7132aee..f90c2c19a 100644 --- a/bumble/hci.py +++ b/bumble/hci.py @@ -3872,11 +3872,19 @@ class AdvertisingProperties(enum.IntFlag): ANONYMOUS_ADVERTISING = 1 << 5 INCLUDE_TX_POWER = 1 << 6 + @property + def name(self) -> str: + return super().name or str(self) + class ChannelMap(enum.IntFlag): CHANNEL_37 = 1 << 0 CHANNEL_38 = 1 << 1 CHANNEL_39 = 1 << 2 + @property + def name(self) -> str: + return super().name or str(self) + # ----------------------------------------------------------------------------- @HCI_Command.command(