diff --git a/bumble/hid.py b/bumble/hid.py index c0fb053..5ea9b98 100644 --- a/bumble/hid.py +++ b/bumble/hid.py @@ -402,7 +402,7 @@ class Device(HID): report_type = pdu[0] & 0x03 buffer_flag = (pdu[0] & 0x08) >> 3 report_id = pdu[1] - logger.debug("buffer_flag: " + str(buffer_flag)) + logger.debug(f"buffer_flag: {buffer_flag}") if buffer_flag == 1: buffer_size = (pdu[3] << 8) | pdu[2] else: diff --git a/examples/run_hid_device.py b/examples/run_hid_device.py index b71e38b..9aebfc2 100644 --- a/examples/run_hid_device.py +++ b/examples/run_hid_device.py @@ -590,12 +590,12 @@ async def main(): def on_set_protocol_cb(protocol: int): retValue = hid_device.GetSetStatus() # We do not support SET_PROTOCOL. - print("SET_PROTOCOL report_id: " + str(protocol)) + print(f"SET_PROTOCOL report_id: {protocol}") retValue.status = hid_device.GetSetReturn.ERR_UNSUPPORTED_REQUEST return retValue def on_virtual_cable_unplug_cb(): - print(f'Received Virtual Cable Unplug') + print('Received Virtual Cable Unplug') asyncio.create_task(handle_virtual_cable_unplug()) print('<<< connecting to HCI...')