From 373bfcbd0d60a2db07a3b58b856aa57f6ab5fbe3 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Thu, 14 Nov 2024 15:28:28 +0100 Subject: [PATCH] Implement correct plural for partial success --- core/dbt/events/types.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py index cf5368fca0a..8a49b91155e 100644 --- a/core/dbt/events/types.py +++ b/core/dbt/events/types.py @@ -1927,9 +1927,17 @@ def code(self) -> str: return "Z030" def message(self) -> str: + + class PartialSuccess: + def __str__(self) -> str: + return "partial success" + + def pluralize(self) -> str: + return f"{self}es" + error_plural = pluralize(self.num_errors, "error") warn_plural = pluralize(self.num_warnings, "warning") - partial_success_plural = pluralize(self.num_partial_success, "partial success") + partial_success_plural = pluralize(self.num_partial_success, PartialSuccess()) if self.keyboard_interrupt: message = yellow("Exited because of keyboard interrupt")