Skip to content

Commit 52ff3ea

Browse files
committed
pylint caught an inconsistency
1 parent a3cc3eb commit 52ff3ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

adafruit_ble/advertising/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def encode_data(data_dict, *, key_encoding="B"):
8686
struct.pack_into(key_encoding, data, i + 1, key)
8787
data[i + 1 + key_size : i + 1 + item_length] = bytes(value)
8888
i += 1 + item_length
89-
return data
89+
return bytes(data)
9090

9191

9292
class AdvertisingDataField:

adafruit_ble/characteristics/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ class Characteristic:
5151
:param int write_perm: Specifies whether the characteristic can be written by a client,
5252
and if so, which security mode is required. Values allowed are the same as ``read_perm``.
5353
:param int max_length: Maximum length in bytes of the characteristic value. The maximum allowed
54-
is 512, or on nRF, 510 if ``fixed_length`` is True. The default, 20, is the maximum
54+
by the BLE specification is 512. On nRF, if ``fixed_length`` is ``True``, the maximum
55+
is 510. The default value is 20, which is the maximum
5556
number of data bytes that fit in a single BLE 4.x ATT packet.
5657
:param bool fixed_length: True if the characteristic value is of fixed length.
5758
:param buf initial_value: The initial value for this characteristic. If not given, will be

0 commit comments

Comments
 (0)