From 35550ded34cda0065fb43f9e03aad66fb0b99b77 Mon Sep 17 00:00:00 2001 From: Thomas Reynaud Date: Thu, 28 Nov 2024 16:20:45 +0100 Subject: [PATCH] Access DEBUG flag though get_flags() --- core/dbt/parser/manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/dbt/parser/manifest.py b/core/dbt/parser/manifest.py index 98e7cea6257..16a7c5d5ae8 100644 --- a/core/dbt/parser/manifest.py +++ b/core/dbt/parser/manifest.py @@ -626,10 +626,11 @@ def check_for_spaces_in_resource_names(self): if self.root_project.args.REQUIRE_RESOURCE_NAMES_WITHOUT_SPACES else EventLevel.WARN ) + flags = get_flags() for node in self.manifest.nodes.values(): if " " in node.name: - if improper_resource_names == 0 or self.root_project.args.DEBUG: + if improper_resource_names == 0 or flags.DEBUG: fire_event( SpacesInResourceNameDeprecation( unique_id=node.unique_id, @@ -641,7 +642,6 @@ def check_for_spaces_in_resource_names(self): if improper_resource_names > 0: if level == EventLevel.WARN: - flags = get_flags() dbt.deprecations.warn( "resource-names-with-spaces", count_invalid_names=improper_resource_names,