diff options
author | Adrian Herrmann <[email protected]> | 2023-12-05 13:00:27 +0100 |
---|---|---|
committer | Adrian Herrmann <[email protected]> | 2023-12-06 11:52:07 +0100 |
commit | 592c734e57b00040329b49dfbe11869980dff88a (patch) | |
tree | 79fa3498cb974e5026415971ec83107b92b65919 /examples/bluetooth/heartrate_server/heartrate_server.py | |
parent | c0329cff9d7378b8bf6a17baeb97bf5a240977fc (diff) |
Examples: Fix a number of flake8 errors (part 1)
First batch, including low-hanging fruit like Alignments, whitespaces,
line length, indents, etc.
Pick-to: 6.6
Change-Id: I55966876077f7fddfdc82cbe376677af9995f329
Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'examples/bluetooth/heartrate_server/heartrate_server.py')
-rw-r--r-- | examples/bluetooth/heartrate_server/heartrate_server.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/bluetooth/heartrate_server/heartrate_server.py b/examples/bluetooth/heartrate_server/heartrate_server.py index 801584565..abbf4eb7f 100644 --- a/examples/bluetooth/heartrate_server/heartrate_server.py +++ b/examples/bluetooth/heartrate_server/heartrate_server.py @@ -39,8 +39,8 @@ if __name__ == '__main__': char_data.setUuid(QBluetoothUuid.CharacteristicType.HeartRateMeasurement) char_data.setValue(QByteArray(2, 0)) char_data.setProperties(QLowEnergyCharacteristic.Notify) - client_config = QLowEnergyDescriptorData(QBluetoothUuid.DescriptorType.ClientCharacteristicConfiguration, - QByteArray(2, 0)) + client_config = QLowEnergyDescriptorData( + QBluetoothUuid.DescriptorType.ClientCharacteristicConfiguration, QByteArray(2, 0)) char_data.addDescriptor(client_config) service_data = QLowEnergyServiceData() @@ -66,7 +66,8 @@ if __name__ == '__main__': value = QByteArray() value.append(chr(0)) # Flags that specify the format of the value. value.append(chr(current_heart_rate)) # Actual value. - characteristic = service.characteristic(QBluetoothUuid.CharacteristicType.HeartRateMeasurement) + characteristic = service.characteristic( + QBluetoothUuid.CharacteristicType.HeartRateMeasurement) assert characteristic.isValid() # Potentially causes notification. service.writeCharacteristic(characteristic, value) |