Skip to content

Commit ab88d0f

Browse files
committed
yet more type annotations
1 parent d30c0f9 commit ab88d0f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def __init__(
205205
self._is_connected = False
206206
self._msg_size_lim = MQTT_MSG_SZ_LIM
207207
self._pid = 0
208-
self._timestamp = 0
208+
self._timestamp: float = 0
209209
self.logger = NullLogger()
210210
"""An optional logging attribute that can be set with with a Logger
211211
to enable debug logging."""
@@ -364,7 +364,13 @@ def mqtt_msg(self, msg_size: int) -> None:
364364
if msg_size < MQTT_MSG_MAX_SZ:
365365
self._msg_size_lim = msg_size
366366

367-
def will_set(self, topic=None, payload=None, qos=0, retain=False):
367+
def will_set(
368+
self,
369+
topic: Union[str, None] = None,
370+
payload: Union[int, float, str, None] = None,
371+
qos: int = 0,
372+
retain: bool = False,
373+
) -> None:
368374
"""Sets the last will and testament properties. MUST be called before `connect()`.
369375
370376
:param str topic: MQTT Broker topic.

0 commit comments

Comments
 (0)