Skip to content
Snippets Groups Projects
Commit 984e6027 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add some documentation about the step class

parent 6ed19bbe
No related branches found
No related tags found
No related merge requests found
...@@ -171,6 +171,9 @@ class Stage(Iterable): ...@@ -171,6 +171,9 @@ class Stage(Iterable):
class PhaseIterator(Iterator): class PhaseIterator(Iterator):
class Step: class Step:
"""Allow handling phases which are equivalent e.g. outcomes (accepted/rejected)
Delegates to the underlying phases except where naming is concerned
"""
def __init__(self, phases: List['Phase']) -> None: def __init__(self, phases: List['Phase']) -> None:
self.phases = phases self.phases = phases
...@@ -180,6 +183,7 @@ class PhaseIterator(Iterator): ...@@ -180,6 +183,7 @@ class PhaseIterator(Iterator):
@property @property
def name(self) -> str: def name(self) -> str:
# Hardcode a name for multi-phased step - always outcome at the moment
if len(self.phases) > 1: if len(self.phases) > 1:
return 'Outcome' return 'Outcome'
return self.phases[0].name return self.phases[0].name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment