Skip to content

Commit e0305cf

Browse files
committed
chore: Apply suggestions for co-pilot code review
1 parent 8e974ba commit e0305cf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

roborock/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ async def run():
9797
except Exception:
9898
_LOGGER.exception("Uncaught exception in command")
9999
click.echo(f"Error: {sys.exc_info()[1]}", err=True)
100-
await context.cleanup()
100+
finally:
101+
await context.cleanup()
101102

102103
if context.is_session_mode():
103104
# Session mode - run in the persistent loop
@@ -775,7 +776,7 @@ async def command(ctx, cmd, device_id, params):
775776
if (cmd_value := _parse_b01_q10_command(cmd)) is None:
776777
raise RoborockException(f"Invalid command {cmd} for B01_Q10 device")
777778
await device.b01_q10_properties.send(cmd_value, json.loads(params) if params is not None else {})
778-
# B10 Commands don't have a specific time to respond, so wait a bit
779+
# Q10 commands don't have a specific time to respond, so wait a bit
779780
await asyncio.sleep(5)
780781
else:
781782
raise RoborockException(f"Device {device.name} does not support sending raw commands")

roborock/devices/traits/b01/q10/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def start_clean(self) -> None:
4545
command=B01_Q10_DP.START_CLEAN,
4646
# TODO: figure out other commands
4747
# 1 = start cleaning
48-
# 2 = electoral clean, also has "clean_paramters"
48+
# 2 = "electoral" clean, also has "clean_parameters"
4949
# 4 = fast create map
5050
params={"cmd": 1},
5151
)
@@ -58,7 +58,7 @@ async def pause_clean(self) -> None:
5858
)
5959

6060
async def resume_clean(self) -> None:
61-
"""Pause cleaning."""
61+
"""Resume cleaning."""
6262
await self.send(
6363
command=B01_Q10_DP.RESUME,
6464
params={},

0 commit comments

Comments
 (0)