Skip to content

Commit

Permalink
Access DEBUG flag though get_flags()
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Reynaud committed Nov 28, 2024
1 parent 1b7d9b5 commit 35550de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/dbt/parser/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 35550de

Please sign in to comment.