mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 23:37:14 +03:00
l10n.py: Two minor typing fixes
This commit is contained in:
parent
85fc308d42
commit
36bd08d715
4
l10n.py
4
l10n.py
@ -83,7 +83,7 @@ class _Translations:
|
||||
self.translations = {None: {}}
|
||||
builtins.__dict__['_'] = lambda x: str(x).replace(r'\"', '"').replace('{CR}', '\n')
|
||||
|
||||
def install(self, lang: str = None) -> None: # noqa: CCR001
|
||||
def install(self, lang: str | None = None) -> None: # noqa: CCR001
|
||||
"""
|
||||
Install the translation function to the _ builtin.
|
||||
|
||||
@ -250,7 +250,7 @@ class _Locale:
|
||||
self.float_formatter.setMinimumFractionDigits_(5)
|
||||
self.float_formatter.setMaximumFractionDigits_(5)
|
||||
|
||||
def stringFromNumber(self, number: Union[float, int], decimals: int = None) -> str: # noqa: N802
|
||||
def stringFromNumber(self, number: Union[float, int], decimals: int | None = None) -> str: # noqa: N802
|
||||
warnings.warn(DeprecationWarning('use _Locale.string_from_number instead.'))
|
||||
return self.string_from_number(number, decimals) # type: ignore
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user