Skip to content

Commit 66fcd53

Browse files
committed
Remove defaults from internal _format_currency_long_name's args; remove unused arg
1 parent 6bbdc0e commit 66fcd53

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

babel/numbers.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,17 @@ def format_currency(
770770
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.
771771
"""
772772
if format_type == 'name':
773-
return _format_currency_long_name(number, currency, format=format,
774-
locale=locale, currency_digits=currency_digits,
775-
decimal_quantization=decimal_quantization, group_separator=group_separator,
776-
numbering_system=numbering_system)
773+
return _format_currency_long_name(
774+
number,
775+
currency,
776+
locale=locale,
777+
format=format,
778+
currency_digits=currency_digits,
779+
decimal_quantization=decimal_quantization,
780+
group_separator=group_separator,
781+
numbering_system=numbering_system,
782+
)
783+
777784
locale = Locale.parse(locale)
778785
if format:
779786
pattern = parse_pattern(format)
@@ -791,14 +798,13 @@ def format_currency(
791798
def _format_currency_long_name(
792799
number: float | decimal.Decimal | str,
793800
currency: str,
794-
format: str | NumberPattern | None = None,
795-
locale: Locale | str | None = LC_NUMERIC,
796-
currency_digits: bool = True,
797-
format_type: Literal["name", "standard", "accounting"] = "standard",
798-
decimal_quantization: bool = True,
799-
group_separator: bool = True,
800801
*,
801-
numbering_system: Literal["default"] | str = "latn",
802+
locale: Locale | str | None = LC_NUMERIC,
803+
format: str | NumberPattern | None,
804+
currency_digits: bool,
805+
decimal_quantization: bool,
806+
group_separator: bool,
807+
numbering_system: Literal["default"] | str,
802808
) -> str:
803809
# Algorithm described here:
804810
# https://www.unicode.org/reports/tr35/tr35-numbers.html#Currencies

0 commit comments

Comments
 (0)