1
0
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:
Athanasius 2022-08-13 15:34:33 +01:00
parent 1296159532
commit abebcf77d3
No known key found for this signature in database
GPG Key ID: 8C392035DD80FD62

View File

@ -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]:
"""