File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,6 +200,14 @@ def _extract(node: nodes.Node, parent: t.Optional[nodes.Node] = None) -> None:
200200 return extracted
201201
202202
203+ def is_variable_node (n : nodes .Node ) -> bool :
204+ return (
205+ isinstance (n , nodes .Call )
206+ and isinstance (n .node , nodes .Name )
207+ and n .node .name in (c .VAR , c .BLUEPRINT_VAR )
208+ )
209+
210+
203211def extract_macro_references_and_variables (
204212 * jinja_strs : str , dbt_target_name : t .Optional [str ] = None
205213) -> t .Tuple [t .Set [MacroReference ], t .Set [str ]]:
@@ -228,13 +236,6 @@ def extract_macro_references_and_variables(
228236 )
229237 )
230238
231- def is_variable_node (n : nodes .Node ) -> bool :
232- return (
233- isinstance (n , nodes .Call )
234- and isinstance (n .node , nodes .Name )
235- and n .node .name in (c .VAR , c .BLUEPRINT_VAR )
236- )
237-
238239 for call_name , node in extract_call_names (jinja_str ):
239240 if call_name [0 ] in (c .VAR , c .BLUEPRINT_VAR ):
240241 if not is_variable_node (node ):
You can’t perform that action at this time.
0 commit comments