From 81a6b1e097f238cdab733d1d36e868345ef0b9f7 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Fri, 8 Dec 2023 11:10:17 +0800 Subject: [PATCH] Replace 3.9 dict merger --- bumble/profiles/bap.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bumble/profiles/bap.py b/bumble/profiles/bap.py index 63048f7..fcaf3f6 100644 --- a/bumble/profiles/bap.py +++ b/bumble/profiles/bap.py @@ -1075,11 +1075,14 @@ class AudioStreamControlService(gatt.TemplateService): ) -> None: self.device = device self.ase_state_machines = { - id: AseStateMachine(role=AudioRole.SINK, ase_id=id, service=self) - for id in sink_ase_id - } | { - id: AseStateMachine(role=AudioRole.SOURCE, ase_id=id, service=self) - for id in source_ase_id + **{ + id: AseStateMachine(role=AudioRole.SINK, ase_id=id, service=self) + for id in sink_ase_id + }, + **{ + id: AseStateMachine(role=AudioRole.SOURCE, ase_id=id, service=self) + for id in source_ase_id + }, } # ASE state machines, by ASE ID for ase in self.ase_state_machines.values():