From b18555539eaaaf357bba9566c03cb0f50a7457f3 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Wed, 6 May 2026 17:16:40 +0800 Subject: [PATCH] Type some optional attributes --- bumble/device.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bumble/device.py b/bumble/device.py index dd0e2490..d19364c5 100644 --- a/bumble/device.py +++ b/bumble/device.py @@ -2343,6 +2343,9 @@ class Device(utils.CompositeEventEmitter): _pending_cis: dict[int, tuple[int, int]] gatt_service: gatt_service.GenericAttributeProfileService | None = None keystore: KeyStore | None = None + inquiry_response: bytes | None = None + address_resolver: smp.AddressResolver | None = None + connect_own_address_type: hci.OwnAddressType | None = None EVENT_ADVERTISEMENT = "advertisement" EVENT_PERIODIC_ADVERTISING_SYNC_TRANSFER = "periodic_advertising_sync_transfer" @@ -2461,17 +2464,12 @@ def __init__( self.bis_links = {} self.big_syncs = {} self.classic_enabled = False - self.inquiry_response = None - self.address_resolver = None self.classic_pending_accepts = { hci.Address.ANY: [] } # Futures, by BD address OR [Futures] for hci.Address.ANY self._cis_lock = asyncio.Lock() - # Own address type cache - self.connect_own_address_type = None - self.name = config.name self.public_address = hci.Address.ANY self.random_address = config.address