Skip to content

Commit

Permalink
Add new functions for Babel 2.11.0 (#9091)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
DenverCoder1 and AlexWaygood committed Nov 4, 2022
1 parent 7299b07 commit 26841a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stubs/babel/babel/core.pyi
Expand Up @@ -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): ...
Expand Down
5 changes: 5 additions & 0 deletions stubs/babel/babel/numbers.pyi
@@ -1,5 +1,7 @@
from typing import Any

from babel.core import Locale

long = int
LC_NUMERIC: Any

Expand Down Expand Up @@ -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): ...

Expand Down

0 comments on commit 26841a8

Please sign in to comment.