]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Remove defaults from internal `_format_currency_long_name`'s args; remove unused arg
authorAarni Koskela <akx@iki.fi>
Wed, 8 Jan 2025 13:57:55 +0000 (15:57 +0200)
committerAarni Koskela <akx@iki.fi>
Thu, 9 Jan 2025 08:25:16 +0000 (10:25 +0200)
babel/numbers.py

index 624e8d61e3015d0f201616acd784dfd9b42c604c..e71e5d8830765c5c6c97f84ef4c9e91023149ec9 100644 (file)
@@ -770,10 +770,17 @@ def format_currency(
     :raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.
     """
     if format_type == 'name':
-        return _format_currency_long_name(number, currency, format=format,
-                                          locale=locale, currency_digits=currency_digits,
-                                          decimal_quantization=decimal_quantization, group_separator=group_separator,
-                                          numbering_system=numbering_system)
+        return _format_currency_long_name(
+            number,
+            currency,
+            locale=locale,
+            format=format,
+            currency_digits=currency_digits,
+            decimal_quantization=decimal_quantization,
+            group_separator=group_separator,
+            numbering_system=numbering_system,
+        )
+
     locale = Locale.parse(locale)
     if format:
         pattern = parse_pattern(format)
@@ -791,14 +798,13 @@ def format_currency(
 def _format_currency_long_name(
     number: float | decimal.Decimal | str,
     currency: str,
-    format: str | NumberPattern | None = None,
-    locale: Locale | str | None = LC_NUMERIC,
-    currency_digits: bool = True,
-    format_type: Literal["name", "standard", "accounting"] = "standard",
-    decimal_quantization: bool = True,
-    group_separator: bool = True,
     *,
-    numbering_system: Literal["default"] | str = "latn",
+    locale: Locale | str | None = LC_NUMERIC,
+    format: str | NumberPattern | None,
+    currency_digits: bool,
+    decimal_quantization: bool,
+    group_separator: bool,
+    numbering_system: Literal["default"] | str,
 ) -> str:
     # Algorithm described here:
     # https://www.unicode.org/reports/tr35/tr35-numbers.html#Currencies