diff --git a/pyproject.toml b/pyproject.toml index 70af6dd..b00b2e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,8 +63,6 @@ ignore = [ "EM102", "FBT002", "FBT003", - "G002", - "G004", "TRY002", "TRY003", "TRY300", diff --git a/roombapy/remote_client.py b/roombapy/remote_client.py index da7379f..563047e 100644 --- a/roombapy/remote_client.py +++ b/roombapy/remote_client.py @@ -122,8 +122,9 @@ def _internal_on_connect(self, client, userdata, flags, rc): # If response code(rc) is 0 then connection was succesfull. if rc != 0 and connection_error is None: self.log.warning( - f"Unknown connection error: ID={rc}." - "Kindly use https://github.com/pschmitt/roombapy/issues/new" + "Unknown connection error: ID=%s." + "Kindly use https://github.com/pschmitt/roombapy/issues/new", + rc, ) connection_error = "UNKNOWN_ERROR" if self.on_connect is not None: @@ -137,8 +138,9 @@ def _internal_on_disconnect(self, client, userdata, rc): # If response code(rc) is 0 then connection was succesfull. if rc != 0 and connection_error is None: self.log.warning( - f"Unknown disconnection error: ID={rc}." - "Kindly use https://github.com/pschmitt/roombapy/issues/new" + "Unknown disconnection error: ID=%s." + "Kindly use https://github.com/pschmitt/roombapy/issues/new", + rc, ) connection_error = "UNKNOWN_ERROR" if self.on_disconnect is not None: diff --git a/roombapy/roomba.py b/roombapy/roomba.py index ff1fc91..5cc9c44 100755 --- a/roombapy/roomba.py +++ b/roombapy/roomba.py @@ -234,7 +234,7 @@ def set_preference(self, preference, setting): tmp = {preference: val} roomba_command = {"state": tmp} str_command = orjson.dumps(roomba_command).decode("utf-8") - self.log.debug("Publishing Roomba Setting : %s" % str_command) + self.log.debug("Publishing Roomba Setting : %s", str_command) self.remote_client.publish("delta", str_command) def dict_merge(self, dct, merge_dct):