Skip to content

Commit 5a5c819

Browse files
committed
(states) VariableWriter can be typed
1 parent 3b874a7 commit 5a5c819

File tree

1 file changed

+2
-2
lines changed
  • robot_smach_states/src/robot_smach_states/util/designators

1 file changed

+2
-2
lines changed

robot_smach_states/src/robot_smach_states/util/designators/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def _get_current(self):
219219
current = property(_get_current, _set_current)
220220

221221

222-
class VariableWriter(object):
222+
class VariableWriter(Generic[T]):
223223
"""When writing to a VariableDesignator you must use a writer,
224224
to make it explicit who changes designators so you can directly spot the changer.
225225
This way, the dataflow can be more accurately visualized and understood.
@@ -314,7 +314,7 @@ def _set_current(self, value):
314314
def _get_resolve_type(self):
315315
return self.variable_designator.resolve_type
316316

317-
resolve_type = property(_get_resolve_type)
317+
resolve_type: T = property(_get_resolve_type)
318318

319319
def resolve(self, *args, **kwargs):
320320
return self.variable_designator.resolve(*args, **kwargs)

0 commit comments

Comments
 (0)