From a9450471052db26f15517900f9dae96d4fbee98f Mon Sep 17 00:00:00 2001 From: Nathaniel May Date: Wed, 20 Oct 2021 12:38:16 -0400 Subject: [PATCH] Fix tracking bug for jinja sampling (#4048) fix jinja sampling for static parser automatic commit by git-black, original commits: 21a7b716574453137f6b74e7c71fbd68d99e053b --- core/dbt/parser/models.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/core/dbt/parser/models.py b/core/dbt/parser/models.py index 72dec883e32..e8385c15b32 100644 --- a/core/dbt/parser/models.py +++ b/core/dbt/parser/models.py @@ -128,10 +128,7 @@ def render_update(self, node: ParsedModelNode, config: ContextConfig) -> None: # if we took a jinja sample, compare now that the base node has been populated if jinja_sample_node is not None and jinja_sample_config is not None: result = _get_stable_sample_result( - jinja_sample_node, - jinja_sample_config, - node, - config + jinja_sample_node, jinja_sample_config, node, config ) # if we took an experimental sample, compare now that the base node has been populated @@ -278,11 +275,7 @@ def populate( # the manifest is often huge so this method avoids deepcopying it def partial_deepcopy(self): - return ModelParser( - deepcopy(self.project), - self.manifest, - deepcopy(self.root_project) - ) + return ModelParser(deepcopy(self.project), self.manifest, deepcopy(self.root_project)) # pure function. safe to use elsewhere, but unlikely to be useful outside this file. @@ -347,7 +340,7 @@ def _get_sample_result( sample_node: ParsedModelNode, sample_config: ContextConfig, node: ParsedModelNode, - config: ContextConfig + config: ContextConfig, ) -> List[Tuple[int, str]]: result: List[Tuple[int, str]] = [] # look for false positive configs