File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
roborock/devices/traits/v1 Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1212
1313_LOGGER = logging .getLogger (__name__ )
1414
15+ _TRUNCATE_LENGTH = 20
16+
1517
1618@dataclass
1719class MapContent (RoborockBase ):
@@ -23,6 +25,13 @@ class MapContent(RoborockBase):
2325 map_data : MapData | None = None
2426 """The parsed map data which contains metadata for points on the map."""
2527
28+ def __repr__ (self ) -> str :
29+ """Return a string representation of the MapContent."""
30+ img = self .image_content
31+ if self .image_content and len (self .image_content ) > _TRUNCATE_LENGTH :
32+ img = self .image_content [: _TRUNCATE_LENGTH - 3 ] + b"..."
33+ return f"MapContent(image_content={ img !r} , map_data={ self .map_data !r} )"
34+
2635
2736@common .map_rpc_channel
2837class MapContentTrait (MapContent , common .V1TraitMixin ):
You can’t perform that action at this time.
0 commit comments