setup: allow num2words >= 0.5.9 (#82017)
gitea/hobo/pipeline/head There was a failure building this commit Details

This commit is contained in:
Frédéric Péters 2023-10-05 10:12:20 +02:00
parent 78d41f6316
commit 67609853be
2 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,8 @@ def as_numeral_currency(number):
if not number:
return ''
try:
return num2words(unlazy(number), lang=get_language(), to='currency')
# workaround newer num2words always specifiying cents
return num2words(unlazy(number), lang=get_language(), to='currency').removesuffix(' et zéro centimes')
except (TypeError, ValueError, decimal.InvalidOperation):
return ''

View File

@ -156,7 +156,7 @@ setup(
'djangorestframework>=3.12, <3.15',
'dnspython',
'lxml',
'num2words==0.5.9',
'num2words>=0.5.9',
'sorl-thumbnail',
'Pillow',
],