Skip to content

Commit

Permalink
style(unit_test): avoid if continue
Browse files Browse the repository at this point in the history
  • Loading branch information
devmessias committed Nov 11, 2024
1 parent 64bec4d commit 0afd0d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/dbt/parser/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,15 @@ def parse_unit_test_case(self, test_case: UnitTestDefinition):
defer_relation=original_input_node.defer_relation,
)

if not resource_type == NodeType.Model:
continue
if original_input_node.version:
input_node.version = original_input_node.version
if original_input_node.latest_version:
input_node.latest_version = original_input_node.latest_version
elif resource_type in (NodeType.Seed, NodeType.Snapshot):
input_node = ModelNode(
**common_fields,
defer_relation=original_input_node.defer_relation,
)

elif resource_type == NodeType.Source:
# We are reusing the database/schema/identifier from the original source,
Expand Down

0 comments on commit 0afd0d9

Please sign in to comment.