Skip to content

Commit

Permalink
Merge pull request #361 from Leon0824/main
Browse files Browse the repository at this point in the history
Unify connect() argument name to 'taskspec'
  • Loading branch information
essweine authored Oct 31, 2023
2 parents c9786c5 + 609ee3a commit 220de40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions SpiffWorkflow/specs/ExclusiveChoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, wf_spec, name, **kwargs):
super(ExclusiveChoice, self).__init__(wf_spec, name, **kwargs)
self.default_task_spec = None

def connect(self, task_spec):
def connect(self, taskspec):
"""
Connects the task spec that is executed if no other condition
matches.
Expand All @@ -54,8 +54,8 @@ def connect(self, task_spec):
:param task_spec: The following task spec.
"""
assert self.default_task_spec is None
self.default_task_spec = task_spec.name
super().connect(task_spec)
self.default_task_spec = taskspec.name
super().connect(taskspec)

def test(self):
super().test()
Expand Down
4 changes: 2 additions & 2 deletions SpiffWorkflow/specs/MultiChoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def __init__(self, wf_spec, name, **kwargs):
self.cond_task_specs = []
self.choice = None

def connect(self, task_spec):
def connect(self, taskspec):
"""
Convenience wrapper around connect_if() where condition is set to None.
"""
return self.connect_if(None, task_spec)
return self.connect_if(None, taskspec)

def connect_if(self, condition, task_spec):
"""
Expand Down
6 changes: 3 additions & 3 deletions SpiffWorkflow/specs/ThreadSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def __init__(self,
else:
self.thread_starter = None

def connect(self, task_spec):
def connect(self, taskspec):
"""
Connect the *following* task to this one. In other words, the
given task is added as an output task.
task -- the task to connect to.
"""
self.thread_starter._outputs.append(task_spec.name)
task_spec._connect_notify(self.thread_starter)
self.thread_starter._outputs.append(taskspec.name)
taskspec._connect_notify(self.thread_starter)

def _get_activated_tasks(self, my_task, destination):
"""
Expand Down

0 comments on commit 220de40

Please sign in to comment.