From 1425e3a3e1681dbc15b169c46debdb762986fb93 Mon Sep 17 00:00:00 2001 From: Rapsssito Date: Wed, 14 Aug 2024 13:05:41 +0200 Subject: [PATCH] Fix linting --- .../components/esp32_ble_server/__init__.py | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/esphome/components/esp32_ble_server/__init__.py b/esphome/components/esp32_ble_server/__init__.py index d18b079997..ee0fa07705 100644 --- a/esphome/components/esp32_ble_server/__init__.py +++ b/esphome/components/esp32_ble_server/__init__.py @@ -169,8 +169,15 @@ def parse_uuid(uuid): def parse_descriptor_value(value): # Compute the maximum length of the descriptor value # Also parse the value for byte arrays - for val_method in [cv.boolean, cv.float_, cv.hex_uint8_t, - cv.hex_uint16_t, cv.hex_uint32_t, cv.int_, cv.string]: + for val_method in [ + cv.boolean, + cv.float_, + cv.hex_uint8_t, + cv.hex_uint16_t, + cv.hex_uint32_t, + cv.int_, + cv.string + ]: try: val = val_method(value) buffer = ByteBuffer_ns.wrap(val) @@ -281,9 +288,16 @@ async def parse_characteristic_value(value, args): args, ByteBuffer, ByteBuffer_ns.wrap, - ) - for val_method in [cv.boolean, cv.float_, cv.hex_uint8_t, - cv.hex_uint16_t, cv.hex_uint32_t, cv.int_, cv.string]: + ) + for val_method in [ + cv.boolean, + cv.float_, + cv.hex_uint8_t, + cv.hex_uint16_t, + cv.hex_uint32_t, + cv.int_, + cv.string + ]: try: val = val_method(value) return ByteBuffer_ns.wrap(val)