diff -r 899c7cb866a2 -r b4fde9ee3d83 MqttMonitor/MqttClient.py --- a/MqttMonitor/MqttClient.py Sat Dec 31 16:27:45 2022 +0100 +++ b/MqttMonitor/MqttClient.py Tue Jul 04 15:13:37 2023 +0200 @@ -156,7 +156,7 @@ self.__mqttClient.on_log = self.__onLog self.__mqttClient.on_publish = self.__onPublish - def __onConnectV3(self, client, userdata, flags, rc, properties=None): + def __onConnectV3(self, client, userdata, flags, rc, properties=None): # noqa: U100 """ Private method to handle the connect to the broker (MQTT v3.1 and v3.1.1). @@ -173,7 +173,7 @@ """ self.onConnectV3.emit(flags, rc) - def __onDisconnectedV3(self, client, userdata, rc): + def __onDisconnectedV3(self, client, userdata, rc): # noqa: U100 """ Private method to handle the disconnect from the broker (MQTT v3.1 and v3.1.1). @@ -186,7 +186,7 @@ """ self.onDisconnectedV3.emit(rc) - def __onSubscribeV3(self, client, userdata, mid, grantedQos): + def __onSubscribeV3(self, client, userdata, mid, grantedQos): # noqa: U100 """ Private method to handle a subscribe event (MQTT v3.1 and v3.1.1). @@ -201,7 +201,7 @@ """ self.onSubscribeV3.emit(mid, grantedQos) - def __onUnsubscribeV3(self, client, userdata, mid): + def __onUnsubscribeV3(self, client, userdata, mid): # noqa: U100 """ Private method to handle an unsubscribe event (MQTT v3.1 and v3.1.1). @@ -214,7 +214,7 @@ """ self.onUnsubscribeV3.emit(mid) - def __onMessageV3(self, client, userdata, message): + def __onMessageV3(self, client, userdata, message): # noqa: U100 """ Private method to handle a new message received from the broker (MQTT v3.1 and v3.1.1). @@ -230,7 +230,7 @@ message.topic, message.payload, message.qos, message.retain ) - def __onConnectV5(self, client, userdata, flags, rc, properties=None): + def __onConnectV5(self, client, userdata, flags, rc, properties=None): # noqa: U100 """ Private method to handle the connect to the broker (MQTT v5.0). @@ -252,7 +252,7 @@ properties.json() if properties is not None else {}, ) - def __onDisconnectedV5(self, client, userdata, rc, properties=None): + def __onDisconnectedV5(self, client, userdata, rc, properties=None): # noqa: U100 """ Private method to handle the disconnect from the broker (MQTT v5.0). @@ -274,6 +274,7 @@ self.onDisconnectedV5.emit(resultCode, packetType) def __onSubscribeV5(self, client, userdata, mid, reasonCodes, properties=None): + # noqa: U100 """ Private method to handle a subscribe event (MQTT v5.0). @@ -295,6 +296,7 @@ ) def __onUnsubscribeV5(self, client, userdata, mid, properties, reasonCodes): + # noqa: U100 """ Private method to handle an unsubscribe event (MQTT v5.0). @@ -316,7 +318,7 @@ properties.json() if properties is not None else {}, ) - def __onMessageV5(self, client, userdata, message): + def __onMessageV5(self, client, userdata, message): # noqa: U100 """ Private method to handle a new message received from the broker (MQTT v5.0). @@ -335,7 +337,7 @@ message.properties.json(), ) - def __onLog(self, client, userdata, level, buf): + def __onLog(self, client, userdata, level, buf): # noqa: U100 """ Private method to handle a log event (MQTT v3.1, v3.1.1 and v5.0). @@ -350,7 +352,7 @@ """ self.onLog.emit(level, buf) - def __onPublish(self, client, userdata, mid): + def __onPublish(self, client, userdata, mid): # noqa: U100 """ Private method to handle the publishing of a message (MQTT v3.1, v3.1.1 and v5.0). @@ -468,7 +470,7 @@ ca_certs=caCerts, certfile=certFile, keyfile=keyFile ) return True, "" - except (ValueError, FileNotFoundError) as err: + except (FileNotFoundError, ValueError) as err: return False, str(err) return False, "unspecific error occurred"