Skip to content

Commit 15b66fd

Browse files
committed
Added pylint disable for unused 'flags' variable
1 parent c946275 commit 15b66fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_ble_apple_media.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ def _update(obj):
101101
if length_read > 0:
102102
if length_read < 4:
103103
raise RuntimeError("packet too short")
104-
entity_id, attribute_id, flags = struct.unpack_from("<BBB", obj._buffer)
104+
# Even though flags is currently unused, if it were removed, it would cause there to be
105+
# too many values to unpack which would raise a ValueError
106+
entity_id, attribute_id, flags = struct.unpack_from("<BBB", obj._buffer) # pylint: disable=unused-variable
105107
value = str(obj._buffer[3:length_read], "utf-8")
106108
obj._attribute_cache[(entity_id, attribute_id)] = value
107109

0 commit comments

Comments
 (0)