@@ -338,7 +338,7 @@ def will_set(self, topic=None, payload=None, qos=0, retain=False):
338
338
"""Sets the last will and testament properties. MUST be called before `connect()`.
339
339
340
340
:param str topic: MQTT Broker topic.
341
- :param int, float, str payload: Last will disconnection payload.
341
+ :param int| float| str payload: Last will disconnection payload.
342
342
payloads of type int & float are converted to a string.
343
343
:param int qos: Quality of Service level, defaults to
344
344
zero. Conventional options are ``0`` (send at most once), ``1``
@@ -368,7 +368,7 @@ def add_topic_callback(self, mqtt_topic, callback_method):
368
368
"""Registers a callback_method for a specific MQTT topic.
369
369
370
370
:param str mqtt_topic: MQTT topic identifier.
371
- :param function callback_method: Name of callback method.
371
+ :param function callback_method: The callback method.
372
372
"""
373
373
if mqtt_topic is None or callback_method is None :
374
374
raise ValueError ("MQTT topic and callback method must both be defined." )
@@ -570,7 +570,7 @@ def publish(self, topic, msg, retain=False, qos=0):
570
570
"""Publishes a message to a topic provided.
571
571
572
572
:param str topic: Unique topic identifier.
573
- :param str, int, float, bytes msg: Data to send to the broker.
573
+ :param str| int| float| bytes msg: Data to send to the broker.
574
574
:param bool retain: Whether the message is saved by the broker.
575
575
:param int qos: Quality of Service level for the message, defaults to zero.
576
576
@@ -653,7 +653,7 @@ def subscribe(self, topic, qos=0):
653
653
"""Subscribes to a topic on the MQTT Broker.
654
654
This method can subscribe to one topics or multiple topics.
655
655
656
- :param str, tuple, list topic: Unique MQTT topic identifier string. If
656
+ :param str| tuple| list topic: Unique MQTT topic identifier string. If
657
657
this is a `tuple`, then the tuple should
658
658
contain topic identifier string and qos
659
659
level integer. If this is a `list`, then
@@ -713,7 +713,7 @@ def subscribe(self, topic, qos=0):
713
713
def unsubscribe (self , topic ):
714
714
"""Unsubscribes from a MQTT topic.
715
715
716
- :param str, list topic: Unique MQTT topic identifier string or list.
716
+ :param str| list topic: Unique MQTT topic identifier string or list.
717
717
718
718
"""
719
719
topics = None
0 commit comments