From bcd097cb7f5a2bc91808a736eee99b9041df5ee6 Mon Sep 17 00:00:00 2001 From: "Alberto J. Gomez" Date: Wed, 11 Dec 2024 13:13:30 +0100 Subject: [PATCH] lint --- cmd/run_test.go | 25 ++++++++++++++++--------- pythonsrc/parser/main.py | 4 +++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/cmd/run_test.go b/cmd/run_test.go index ff6c4484..0ac8209f 100644 --- a/cmd/run_test.go +++ b/cmd/run_test.go @@ -59,22 +59,26 @@ var ( }, } - task1 = &pipeline.Asset{Name: "Task1", + task1 = &pipeline.Asset{ + Name: "Task1", Type: pipeline.AssetTypePython, Tags: []string{"tag1", "x"}, } - task2 = &pipeline.Asset{Name: "Task2", + task2 = &pipeline.Asset{ + Name: "Task2", Type: pipeline.AssetTypeBigqueryQuery, Tags: []string{"tag2"}, } - task3 = &pipeline.Asset{Name: "Task3", Type: pipeline.AssetTypePython, + task3 = &pipeline.Asset{ + Name: "Task3", Type: pipeline.AssetTypePython, Tags: []string{"tag4"}, Upstreams: []pipeline.Upstream{{Type: "asset", Value: "Task9"}}, } - task4 = &pipeline.Asset{Name: "Task4", + task4 = &pipeline.Asset{ + Name: "Task4", Type: pipeline.AssetTypeBigqueryQuery, Tags: []string{"tag1", "tag3"}, Upstreams: []pipeline.Upstream{{Type: "asset", Value: "Task9"}}, @@ -493,8 +497,10 @@ func TestApplyFilters(t *testing.T) { IncludeDownstream: true, IncludeTag: "tag1", }, - expectedPending: []string{"Task0", "Task1", "Task4", "Task5", "Task6", "Task7", "Task8", - "Task0:Column0:Check0", "Task0:custom-check:customcheck0"}, // task 2 and 3 shouldnt run + expectedPending: []string{ + "Task0", "Task1", "Task4", "Task5", "Task6", "Task7", "Task8", + "Task0:Column0:Check0", "Task0:custom-check:customcheck0", + }, // task 2 and 3 shouldnt run expectError: false, }, { @@ -654,8 +660,10 @@ func TestApplyFilters(t *testing.T) { }, }, filter: &Filter{}, - expectedPending: []string{"Task0", "Task1", "Task2", "Task3", "Task4", "Task5", "Task6", "Task7", "Task8", "Task9", "Task10", - "Task10:Column10:Check10", "Task10:custom-check:customcheck10", "Task0:Column0:Check0", "Task0:custom-check:customcheck0"}, + expectedPending: []string{ + "Task0", "Task1", "Task2", "Task3", "Task4", "Task5", "Task6", "Task7", "Task8", "Task9", "Task10", + "Task10:Column10:Check10", "Task10:custom-check:customcheck10", "Task0:Column0:Check0", "Task0:custom-check:customcheck0", + }, expectError: false, }, { @@ -663,7 +671,6 @@ func TestApplyFilters(t *testing.T) { pipeline: &pipeline.Pipeline{ Name: "TestPipeline", Assets: []*pipeline.Asset{ - task6, task7, task8, diff --git a/pythonsrc/parser/main.py b/pythonsrc/parser/main.py index a9c095c6..181f933e 100644 --- a/pythonsrc/parser/main.py +++ b/pythonsrc/parser/main.py @@ -177,4 +177,6 @@ def find_leaf_nodes(node: Node, leaf_nodes): def merge_parts(table: exp.Table) -> str: - return ".".join(part.name for part in table.parts if isinstance(part, exp.Identifier)) + return ".".join( + part.name for part in table.parts if isinstance(part, exp.Identifier) + )