Skip to content

Commit b4b048b

Browse files
committed
fix some pylint, apply black
1 parent f80c4be commit b4b048b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -799,15 +799,21 @@ def subscribe(self, topic, qos=0):
799799
rc = self._sock_exact_recv(remaining_len)
800800
for i in range(0, remaining_len):
801801
if rc[i] not in [0, 1, 2]:
802-
raise MMQTTException(f"SUBACK Failure for topic {topics[i][0]}: {hex(rc[i])}")
802+
raise MMQTTException(
803+
f"SUBACK Failure for topic "
804+
f"{topics[i][0]}: {hex(rc[i])}"
805+
)
803806

804807
for t, q in topics:
805808
if self.on_subscribe is not None:
806809
self.on_subscribe(self, self._user_data, t, q)
807810
self._subscribed_topics.append(t)
808811
return
809812
else:
810-
raise MMQTTException(f"invalid message received as response to SUBSCRIBE: {hex(op)}")
813+
raise MMQTTException(
814+
f"invalid message received as response to "
815+
f"SUBSCRIBE: {hex(op)}"
816+
)
811817

812818
def unsubscribe(self, topic):
813819
"""Unsubscribes from a MQTT topic.
@@ -863,7 +869,10 @@ def unsubscribe(self, topic):
863869
self._subscribed_topics.remove(t)
864870
return
865871
else:
866-
raise MMQTTException(f"invalid message received as response to UNSUBSCRIBE: {hex(op)}")
872+
raise MMQTTException(
873+
f"invalid message received as response to "
874+
f"UNSUBSCRIBE: {hex(op)}"
875+
)
867876

868877
def _recompute_reconnect_backoff(self):
869878
"""

0 commit comments

Comments
 (0)