Skip to content

Commit 6ea07a4

Browse files
committed
(states) designators small cleanup
1 parent 3aee3c0 commit 6ea07a4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

robot_smach_states/src/robot_smach_states/util/designators/ed_designators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _resolve(self):
188188
names = [entity.uuid for entity in entities]
189189

190190
if len(entities) >= 1:
191-
rospy.loginfo('choosing best entity from this list (name->weight):\n\t%s', list(zip(names, weights)))
191+
rospy.loginfo(f"choosing best entity from this list (name->weight):\n\t{list(zip(names, weights))}")
192192
return min(entities, key=self.weight_function)
193193
else:
194194
return entities[0]

robot_smach_states/src/robot_smach_states/util/designators/utility.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LockingDesignator(Designator):
3030
A LockingDesignator will resolve to the same object after a call to .lock() and
3131
will only resolve to a different value after an unlock() call.
3232
33-
>>> varying = VariableDesignator(0, int).writeable #To be able to write to a designator, it must be writeable!
33+
>>> varying = VariableDesignator(0, int).writeable # To be able to write to a designator, it must be writeable!
3434
>>> locking = LockingDesignator(varying)
3535
>>> assert(varying.resolve() == 0)
3636
>>> assert(locking.resolve() == 0)
@@ -95,7 +95,7 @@ def _resolve(self):
9595
return self._current
9696
else:
9797
self._current = self.to_be_locked.resolve()
98-
rospy.loginfo("LockingDesignator '{0}' resolved to {1}, but is *not locked* to it".format(self.name, str(self._current)[:30]))
98+
rospy.loginfo(f"LockingDesignator '{self.name}' resolved to {str(self._current)[:30]}, but is *not locked* to it")
9999
return self._current
100100

101101
def __repr__(self):

0 commit comments

Comments
 (0)