Skip to content

Commit 5245afa

Browse files
committed
Changed conditional variable setting to a more sphinx-friendly format
1 parent 15b66fd commit 5245afa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_ble_apple_media.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class _RemoteCommand(ComplexCharacteristic):
5252
uuid = VendorUUID("9B3C81D8-57B1-4A8A-B8DF-0E56F7CA51C2")
5353

5454
def __init__(self):
55-
super().__init__(properties=Characteristic.WRITE_NO_RESPONSE | Characteristic.NOTIFY,
55+
super().__init__(properties=Characteristic.WRITE_NO_RESPONSE if Characteristic.WRITE_NO_RESPONSE else Characteristic.NOTIFY,
5656
read_perm=Attribute.OPEN, write_perm=Attribute.OPEN,
5757
max_length=13,
5858
fixed_length=False)
@@ -68,7 +68,7 @@ class _EntityUpdate(ComplexCharacteristic):
6868
uuid = VendorUUID("2F7CABCE-808D-411F-9A0C-BB92BA96C102")
6969

7070
def __init__(self):
71-
super().__init__(properties=Characteristic.WRITE | Characteristic.NOTIFY,
71+
super().__init__(properties=Characteristic.WRITE if Characteristic.WRITE else Characteristic.NOTIFY,
7272
read_perm=Attribute.OPEN, write_perm=Attribute.OPEN,
7373
max_length=128,
7474
fixed_length=False)
@@ -85,7 +85,7 @@ class _EntityAttribute(Characteristic): # pylint: disable=too-few-public-methods
8585
uuid = VendorUUID("C6B2F38C-23AB-46D8-A6AB-A3A870BBD5D7")
8686

8787
def __init__(self):
88-
super().__init__(properties=Characteristic.WRITE | Characteristic.READ,
88+
super().__init__(properties=Characteristic.WRITE if Characteristic.WRITE else Characteristic.READ,
8989
read_perm=Attribute.OPEN, write_perm=Attribute.OPEN,
9090
fixed_length=False)
9191

0 commit comments

Comments
 (0)