Add new functions for Babel 2.11.0 (#9091)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Jonah Lawrence
2022-11-04 17:23:27 -06:00
committed by GitHub
parent 7299b07790
commit 26841a8353
2 changed files with 7 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ class Locale:
@property
def decimal_formats(self): ...
@property
def compact_decimal_formats(self): ...
@property
def currency_formats(self): ...
@property
def percent_formats(self): ...

View File

@@ -1,5 +1,7 @@
from typing import Any
from babel.core import Locale
long = int
LC_NUMERIC: Any
@@ -34,6 +36,9 @@ def get_decimal_quantum(precision): ...
def format_decimal(
number, format: Any | None = ..., locale=..., decimal_quantization: bool = ..., group_separator: bool = ...
): ...
def format_compact_decimal(
number: float, *, format_type: str = ..., locale: Locale | str | None = ..., fraction_digits: int = ...
) -> str: ...
class UnknownCurrencyFormatError(KeyError): ...