From 5b536d00ab099f18fc7c7523ed3e912c3177be84 Mon Sep 17 00:00:00 2001 From: eukub Date: Thu, 28 Dec 2023 16:27:36 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81hanged=20concatenation=20of=20strings=20t?= =?UTF-8?q?o=20f-strings=20to=20improve=20readability=20and=20unify=20with?= =?UTF-8?q?=20the=20rest=20of=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bumble/hid.py | 2 +- examples/run_hid_device.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bumble/hid.py b/bumble/hid.py index c0fb0535..5ea9b98a 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 b71e38be..9aebfc2a 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...')