Skip to content

Commit

Permalink
ignore max-positional-arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
hmueller01 committed Oct 24, 2024
1 parent eb4a047 commit 354186b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apsystems_ez1_mqtt/mqtthandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
class MQTTHandler:
"""Handle MQTT connection to broker and publish message"""

def __init__(self, trigger_on_status_power, trigger_async_on_max_power, mqtt_config: MQTTConfig, qos: int = 1, retain = False):
def __init__(self, trigger_on_status_power, trigger_async_on_max_power, mqtt_config: MQTTConfig, *, qos: int = 1, retain = False):
self.mqtt_config = mqtt_config
self.qos = qos
self.retain = retain
Expand Down Expand Up @@ -94,7 +94,7 @@ def on_max_power(self, client, userdata, message: mqtt_client.MQTTMessage): # p
self.trigger_async_on_max_power(int(message.payload.decode()))


def _publish(self, client, topic: str, msg: mqtt_client.PayloadType, qos: int = 0, retain: bool = False):
def _publish(self, client, topic: str, msg: mqtt_client.PayloadType, qos: int = 0, retain: bool = False): # pylint: disable=too-many-positional-arguments
result = client.publish(topic, msg, qos, retain)
status = result[0]
if status == 0:
Expand Down

0 comments on commit 354186b

Please sign in to comment.