MCPcopy Create free account
hub / github.com/celery/celery / pluralize

Function pluralize

celery/utils/text.py:96–100  ·  view source on GitHub ↗

Pluralize term when n is greater than one.

(n: float, text: str, suffix: str = 's')

Source from the content-addressed store, hash-verified

94
95
96def pluralize(n: float, text: str, suffix: str = 's') -> str:
97 """Pluralize term when n is greater than one."""
98 if n != 1:
99 return text + suffix
100 return text
101
102
103def pretty(value: str, width: int = 80, nl_width: int = 80, sep: str = '\n', **

Callers 4

purge_messagesMethod · 0.90
flatten_replyFunction · 0.90
on_still_waiting_forMethod · 0.90
humanize_secondsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected