Skip to content

Commit

Permalink
Alter TotalModelNamesWithSpacesDeprecation message to handle singul…
Browse files Browse the repository at this point in the history
…ar and plural
  • Loading branch information
QMalcolm committed Apr 12, 2024
1 parent c678cbc commit a2d609f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def code(self) -> str:
return "D015"

def message(self) -> str:
description = f"Found {self.count_invalid_names} models with spaces in their names, which is deprecated."
description = f"Spaces in model names found in {self.count_invalid_names} model(s), which is deprecated."

if self.show_debug_hint:
description += " Run again with `--debug` to see them all."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def tests_debug_when_spaces_in_name(self, project) -> None:
assert len(spaces_check_catcher.caught_events) == 1
assert len(total_catcher.caught_events) == 1
assert (
"Found 2 models with spaces in their names" in total_catcher.caught_events[0].info.msg
"Spaces in model names found in 2 model(s)" in total_catcher.caught_events[0].info.msg
)
assert (
"Run again with `--debug` to see them all." in total_catcher.caught_events[0].info.msg
Expand Down

0 comments on commit a2d609f

Please sign in to comment.