Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: SajidAlamQB <[email protected]>
  • Loading branch information
SajidAlamQB committed Sep 7, 2023
1 parent cc8e3a5 commit fecdd33
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions package/kedro_viz/models/flowchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def outputs(self) -> Set[str]:
)

def inherit_tags(self, tags: Set[str]):
"""Update the current set of tags with the given tags."""
self.tags.update(tags)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,22 @@ def test_extract_from_node(self, identity):
modular_pipelines.extract_from_node(task_node)
assert modular_pipelines.has_modular_pipeline("data_science")

def test_tags_inheritance(self):
task_node = GraphNode.create_task_node(namespace="data_science", tags={"tag1", "tag2"})
def test_tags_inheritance(self, identity):
task_node = GraphNode.create_task_node(
node(
identity,
inputs="x",
outputs=None,
namespace="data_science",
tags={"tag1", "tag2"},
)
)
modular_pipelines = ModularPipelinesRepository()

modular_pipelines.extract_from_node(task_node)
modular_pipeline = modular_pipelines.get_or_create_modular_pipeline("data_science")
modular_pipeline = modular_pipelines.get_or_create_modular_pipeline(
"data_science"
)

assert "tag1" in modular_pipeline.tags
assert "tag2" in modular_pipeline.tags
Expand Down

0 comments on commit fecdd33

Please sign in to comment.