From 657451474e23c47a2775211870a6a4d0bce66ce4 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Thu, 5 Feb 2026 16:01:21 +0800 Subject: [PATCH] AVRCP: Address type errors --- bumble/avrcp.py | 3 +-- examples/run_avrcp.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bumble/avrcp.py b/bumble/avrcp.py index a96571a..e00cf8e 100644 --- a/bumble/avrcp.py +++ b/bumble/avrcp.py @@ -1539,7 +1539,6 @@ class PlayerApplicationSettingChangedEvent(Event): | ApplicationSetting.ShuffleOnOffStatus | ApplicationSetting.ScanOnOffStatus | ApplicationSetting.GenericValue - | int ) = field(metadata=hci.metadata(1)) def __post_init__(self) -> None: @@ -2835,7 +2834,7 @@ class Protocol(utils.EventEmitter): event = PlayerApplicationSettingChangedEvent( [ PlayerApplicationSettingChangedEvent.Setting( - attribute, value + attribute, value # type: ignore ) for attribute, value in settings.items() ] diff --git a/examples/run_avrcp.py b/examples/run_avrcp.py index 13b34d5..a05361e 100644 --- a/examples/run_avrcp.py +++ b/examples/run_avrcp.py @@ -133,10 +133,10 @@ def on_avrcp_start( utils.AsyncRunner.spawn(get_supported_events()) async def monitor_track_changed() -> None: - async for identifier in avrcp_protocol.monitor_track_changed(): - print("TRACK CHANGED:", identifier.hex()) + async for uid in avrcp_protocol.monitor_track_changed(): + print("TRACK CHANGED:", hex(uid)) websocket_server.send_message( - {"type": "track-changed", "params": {"identifier": identifier.hex()}} + {"type": "track-changed", "params": {"identifier": hex(uid)}} ) async def monitor_playback_status() -> None: