Skip to content

Commit 0023174

Browse files
committed
chore: fix lint errors
1 parent 8786079 commit 0023174

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

roborock/devices/traits/v1/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Create traits for V1 devices."""
22

3-
from dataclasses import dataclass, field, fields
43
import logging
4+
from dataclasses import dataclass, field, fields
55

66
from roborock.containers import HomeData, HomeDataProduct
77
from roborock.devices.traits import Trait
@@ -46,9 +46,9 @@ class PropertiesApi(Trait):
4646
def __init__(self, product: HomeDataProduct, rpc_channel: V1RpcChannel, mqtt_rpc_channel: V1RpcChannel) -> None:
4747
"""Initialize the V1TraitProps with None values."""
4848
self.status = StatusTrait(product)
49-
#self.status._rpc_channel = rpc_channel
49+
# self.status._rpc_channel = rpc_channel
5050
self.maps = MapsTrait(self.status)
51-
#self.maps._rpc_channel = mqtt_rpc_channel
51+
# self.maps._rpc_channel = mqtt_rpc_channel
5252

5353
# This is a hack to allow setting the rpc_channel on all traits. This is
5454
# used so we can preserve the dataclass behavior when the values in the

roborock/devices/traits/v1/common.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
This is an internal library and should not be used directly by consumers.
44
"""
55

6+
import logging
67
from abc import ABC
78
from dataclasses import dataclass, fields
8-
from functools import wraps
9-
import logging
109
from typing import ClassVar, Self
1110

1211
from roborock.containers import RoborockBase
@@ -123,12 +122,14 @@ def _parse_response(cls, response: V1ResponseData) -> Self:
123122

124123
def mqtt_rpc_channel(cls):
125124
"""Decorator to mark a function as cloud only.
126-
125+
127126
Normally a trait uses an adaptive rpc channel that can use either local
128127
or cloud communication depending on what is available. This will force
129128
the trait to always use the cloud rpc channel.
130129
"""
130+
131131
def wrapper(*args, **kwargs):
132132
return cls(*args, **kwargs)
133+
133134
cls.mqtt_rpc_channel = True # type: ignore[attr-defined]
134135
return wrapper

0 commit comments

Comments
 (0)