Skip to content

Commit

Permalink
chore: make status in constructor of ActivityResult optional as not n… (
Browse files Browse the repository at this point in the history
#135)

chore: make status in constructor of ActivityResult optional as not needed in activity testing
  • Loading branch information
arjendev authored Oct 5, 2024
1 parent b5349b0 commit b618304
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/data_factory_testing_framework/state/_activity_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@


class ActivityResult:
def __init__(self, activity_name: str, status: DependencyCondition, output: Optional[Any] = None) -> None: # noqa: ANN401
def __init__(
self,
activity_name: str,
status: Optional[DependencyCondition] = None,
output: Optional[Any] = None, # noqa: ANN401
) -> None:
"""Represents the result of an activity.
Args:
Expand All @@ -13,7 +18,7 @@ def __init__(self, activity_name: str, status: DependencyCondition, output: Opti
output: Output of the activity. (e.g. { "count": 1 } for activity('activityName').output.count)
"""
self.activity_name = activity_name
self.status = status
self.status = status if status is not None else DependencyCondition.SUCCEEDED
self.output = output

def __getitem__(self, item: str) -> Any: # noqa: ANN401
Expand Down

0 comments on commit b618304

Please sign in to comment.