Skip to content

Commit a6565d8

Browse files
committed
chore: Remove duplicate V1TraitDataConverter
1 parent 5cc4bf4 commit a6565d8

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

roborock/devices/traits/v1/common.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,6 @@
1818
V1ResponseData = dict | list | int | str
1919

2020

21-
class V1TraitDataConverter(ABC):
22-
"""Converts responses to RoborockBase objects.
23-
24-
This is an internal class and should not be used directly by consumers.
25-
"""
26-
27-
@abstractmethod
28-
def convert(self, response: V1ResponseData) -> RoborockBase:
29-
"""Convert the values to a dict that can be parsed as a RoborockBase."""
30-
31-
def __repr__(self) -> str:
32-
return self.__class__.__name__
33-
34-
3521
class V1TraitDataConverter(ABC):
3622
"""Converts responses to RoborockBase objects.
3723

roborock/devices/traits/v1/rooms.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ def convert(self, response: common.V1ResponseData) -> Rooms:
4848
raise ValueError(f"Unexpected RoomsTrait response format: {response!r}")
4949
segment_map = self.extract_segment_map(response)
5050
return Rooms(
51-
rooms=[
52-
NamedRoomMapping(segment_id=segment_id, iot_id=iot_id)
53-
for segment_id, iot_id in segment_map.items()
54-
]
51+
rooms=[NamedRoomMapping(segment_id=segment_id, iot_id=iot_id) for segment_id, iot_id in segment_map.items()]
5552
)
5653

5754
@staticmethod

0 commit comments

Comments
 (0)