You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def __setitem__(self, key: Union[slice, int, str], new_step: BaseStep):
"""
Set one step with a key, and a value.
:param key: slice, index, or step name
:type key: Union[slice, int, str]
:param new_step: step
:type new_step: BaseStep
"""
if isinstance(key, str):
index = 0
for step_index, (current_step_name, step) in enumerate(self.steps_as_tuple):
if current_step_name == key:
index = step_index
new_step.set_name(key)
self.steps[index] = new_step
self.steps_as_tuple[index] = (key, new_step)
else:
# TODO !! issue
raise ValueError('type {0} not supported yet in TruncableSteps.__setitem__, please implement it if you need it'.format(type(key)))
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: