Skip to content

Commit

Permalink
fix G002 and G004 (#236)
Browse files Browse the repository at this point in the history
Signed-off-by: Joostlek <[email protected]>
  • Loading branch information
joostlek authored Feb 21, 2024
1 parent a34a808 commit a478f34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ ignore = [
"EM102",
"FBT002",
"FBT003",
"G002",
"G004",
"TRY002",
"TRY003",
"TRY300",
Expand Down
10 changes: 6 additions & 4 deletions roombapy/remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roombapy/roomba.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a478f34

Please sign in to comment.