Skip to content

Commit

Permalink
Standardize on constructor for ResourceTypeSelector where `include_…
Browse files Browse the repository at this point in the history
…empty_nodes=True`
  • Loading branch information
dbeatty10 committed Sep 18, 2024
1 parent 3930eef commit 4555df3
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions core/dbt/task/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,13 @@ def selection_arg(self):
def get_node_selector(self) -> ResourceTypeSelector:
if self.manifest is None or self.graph is None:
raise DbtInternalError("manifest and graph must be set to get perform node selection")
if self.resource_types == [NodeType.Test]:
return ResourceTypeSelector(
graph=self.graph,
manifest=self.manifest,
previous_state=self.previous_state,
resource_types=self.resource_types,
)
else:
return ResourceTypeSelector(
graph=self.graph,
manifest=self.manifest,
previous_state=self.previous_state,
resource_types=self.resource_types,
include_empty_nodes=True,
)
return ResourceTypeSelector(

Check warning on line 202 in core/dbt/task/list.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/task/list.py#L202

Added line #L202 was not covered by tests
graph=self.graph,
manifest=self.manifest,
previous_state=self.previous_state,
resource_types=self.resource_types,
include_empty_nodes=True,
)

def interpret_results(self, results):
# list command should always return 0 as exit code
Expand Down

0 comments on commit 4555df3

Please sign in to comment.