Skip to content

Commit 63e91a7

Browse files
committed
Fixed reprs following compas release
1 parent fd5a3ce commit 63e91a7

File tree

7 files changed

+14
-1143
lines changed

7 files changed

+14
-1143
lines changed

docs/examples/03_backends_ros/files/03_forward_kinematics_urdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
print("Frame in the world coordinate system")
1010
print(frame_WCF)
1111

12-
assert str(frame_WCF.point) == 'Point(0.300, 0.100, 0.500)'
12+
assert repr(frame_WCF.point) == 'Point(0.300, 0.100, 0.500)'

src/compas_fab/backends/ros/messages/direct_ur.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ def __init__(self, **kwargs):
1010
setattr(self, k, v)
1111

1212
def __str__(self):
13-
result = ""
14-
for key, value in self.__dict__.items():
15-
if value:
16-
result += "%s, " % value
17-
return result[:-2]
13+
return ", ".join(["{!r}" for value in self.__dict__.values() if value])
1814

1915
def __repr__(self):
2016
return self.__str__

0 commit comments

Comments
 (0)