Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getattr(self, val.name).state,
field.name,
)
# if task has connections state has to be recalculated
if other_states:
if hasattr(task, "fut_combiner"):
combiner = task.fut_combiner
else:
combiner = None
if task.state:
task.state.update_connections(
new_other_states=other_states, new_combiner=combiner
)
else:
task.state = state.State(
task.name,
splitter=None,
other_states=other_states,
combiner=combiner,
)
def set_state(self, splitter, combiner=None):
"""
Set a particular state on this task.
Parameters
----------
splitter :
TODO
combiner :
TODO
"""
if splitter is not None:
self.state = state.State(
name=self.name, splitter=splitter, combiner=combiner
)
else:
self.state = None
return self.state
def set_state(self, splitter, combiner=None):
"""
Set a particular state on this task.
Parameters
----------
splitter :
TODO
combiner :
TODO
"""
if splitter is not None:
self.state = state.State(
name=self.name, splitter=splitter, combiner=combiner
)
else:
self.state = None
return self.state
getattr(self, val.name).state,
field.name,
)
# if task has connections state has to be recalculated
if other_states:
if hasattr(task, "fut_combiner"):
combiner = task.fut_combiner
else:
combiner = None
if task.state:
task.state.update_connections(
new_other_states=other_states, new_combiner=combiner
)
else:
task.state = state.State(
task.name,
splitter=None,
other_states=other_states,
combiner=combiner,
)