Skip to content

Commit

Permalink
Simply reimplement pluralize for partial success
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Nov 18, 2024
1 parent 92bfbfc commit b6ec92d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1927,17 +1927,9 @@ 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, PartialSuccess())
partial_success_plural = f"""{self.num_partial_success} partial {"success" if self.num_partial_success == 1 else "successes"}"""

if self.keyboard_interrupt:
message = yellow("Exited because of keyboard interrupt")
Expand Down

0 comments on commit b6ec92d

Please sign in to comment.