Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new functions for Babel 2.11.0 #9091

Merged
merged 7 commits into from Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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