Skip to content

Commit

Permalink
Implement correct plural for partial success
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Nov 14, 2024
1 parent e6caced commit cbe747b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cbe747b

Please sign in to comment.