-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: clean up model constructor arguments
- Loading branch information
Showing
7 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
src/python/azure_data_factory_testing_framework/models/activities/activity_dependency.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
from typing import Any, List, Union | ||
from typing import List, Union | ||
|
||
from azure_data_factory_testing_framework.state.dependency_condition import DependencyCondition | ||
|
||
|
||
class ActivityDependency: | ||
def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 | ||
def __init__(self, activity: str, dependencyConditions: List[Union[str, DependencyCondition]] = None) -> None: # noqa: ANN401, N803 | ||
"""ActivityDependency. | ||
Args: | ||
**kwargs: ActivityDependency properties coming directly from the json representation of the activity. | ||
activity: Name of the activity. | ||
dependencyConditions: List of dependency conditions. | ||
""" | ||
self.kwargs = kwargs | ||
self.activity: str = kwargs["activity"] | ||
self.dependency_conditions: List[Union[str, DependencyCondition]] = kwargs["dependencyConditions"] | ||
if dependencyConditions is None: | ||
dependencyConditions = [] # noqa: N806 | ||
|
||
self.activity: str = activity | ||
self.dependency_conditions: List[DependencyCondition] = dependencyConditions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters