File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
roborock/devices/traits/v1 Expand file tree Collapse file tree 1 file changed +5
-2
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 ):
@@ -26,10 +28,11 @@ class MapContent(RoborockBase):
2628 def __repr__ (self ) -> str :
2729 """Return a string representation of the MapContent."""
2830 img = self .image_content
29- if self .image_content and len (self .image_content ) > 20 :
30- img = f" { self .image_content [:17 ] } ..."
31+ if self .image_content and len (self .image_content ) > _TRUNCATE_LENGTH :
32+ img = self .image_content [: _TRUNCATE_LENGTH - 3 ] + b" ..."
3133 return f"MapContent(image_content={ img !r} , map_data={ self .map_data !r} )"
3234
35+
3336@common .map_rpc_channel
3437class MapContentTrait (MapContent , common .V1TraitMixin ):
3538 """Trait for fetching the map content."""
You can’t perform that action at this time.
0 commit comments