Skip to content

Commit

Permalink
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 15, 2023
1 parent 695845c commit 0012d84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cosmos/airflow/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ def build_airflow_graph(
use_name_as_task_id_prefix=test_behavior != TestBehavior.AFTER_EACH,
)
if task_meta and node.resource_type != DbtResourceType.TEST:
if node.resource_type == DbtResourceType.MODEL and node.has_test == True and test_behavior == TestBehavior.AFTER_EACH:
if (
node.resource_type == DbtResourceType.MODEL
and node.has_test is True
and test_behavior == TestBehavior.AFTER_EACH
):
with TaskGroup(dag=dag, group_id=node.name, parent_group=task_group) as model_task_group:
task = create_airflow_task(task_meta, dag, task_group=model_task_group)
test_meta = create_test_task_metadata(
Expand Down
2 changes: 1 addition & 1 deletion cosmos/dbt/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def load_from_dbt_manifest(self) -> None:

logger.info("Total nodes: %i", len(self.nodes))
logger.info("Total filtered nodes: %i", len(self.nodes))

def update_node_dependency(self) -> None:
"""
This will update the node if has `dbt` test
Expand Down

0 comments on commit 0012d84

Please sign in to comment.