Skip to content

Commit cf00211

Browse files
committed
chore: fix lint errors in q7 protocol tests
1 parent 78e43f3 commit cf00211

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tests/devices/traits/b01/q7/test_init.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,17 @@ def __init__(self) -> None:
3333

3434
def build(self, data: dict[str, Any] | str, code: int | None = None) -> RoborockMessage:
3535
"""Build an encoded B01 RPC response message."""
36-
message = {
36+
message: dict[str, Any] = {
3737
"msgId": str(self.msg_id),
3838
"data": data,
3939
}
4040
if code is not None:
4141
message["code"] = code
4242
return self._build_dps(message)
43-
44-
43+
4544
def _build_dps(self, message: dict[str, Any] | str) -> RoborockMessage:
4645
"""Build an encoded B01 RPC response message."""
47-
dps_payload = {
48-
"dps": { "10000": json.dumps(message) }
49-
}
46+
dps_payload = {"dps": {"10000": json.dumps(message)}}
5047
self.seq += 1
5148
return RoborockMessage(
5249
protocol=RoborockMessageProtocol.RPC_RESPONSE,
@@ -187,7 +184,7 @@ async def test_send_decoded_command_error_code(fake_channel: FakeChannel, messag
187184
message = message_builder.build({}, code=5001)
188185
fake_channel.response_queue.append(message)
189186

190-
with pytest.raises(RoborockException, match=f"B01 command failed with code 5001"):
187+
with pytest.raises(RoborockException, match="B01 command failed with code 5001"):
191188
await send_decoded_command(fake_channel, Q7RequestMessage(dps=10000, command="prop.get", params=[])) # type: ignore[arg-type]
192189

193190

0 commit comments

Comments
 (0)