mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 15:27:14 +03:00
l10n: Use locale.format_string() instead of deprecated locale.format()
This commit is contained in:
parent
1296159532
commit
abebcf77d3
4
l10n.py
4
l10n.py
@ -284,10 +284,10 @@ class _Locale:
|
||||
return self.float_formatter.stringFromNumber_(number)
|
||||
|
||||
if not decimals and isinstance(number, numbers.Integral):
|
||||
return locale.format('%d', number, True)
|
||||
return locale.format_string('%d', number, True)
|
||||
|
||||
else:
|
||||
return locale.format('%.*f', (decimals, number), True) # type: ignore # It ends up working out
|
||||
return locale.format_string('%.*f', (decimals, number), True)
|
||||
|
||||
def number_from_string(self, string: str) -> Union[int, float, None]:
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user