Skip to content

Commit 83188f0

Browse files
madduckakx
andcommitted
Update function signature to reflect 1–5 tuple size
Co-authored-by: Aarni Koskela <[email protected]>
1 parent ebbf944 commit 83188f0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

babel/core.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,14 @@ def parse_locale(
12381238
return lang, territory, script, variant
12391239

12401240

1241-
def get_locale_identifier(tup: tuple[str, str | None, str | None, str | None, str | None], sep: str = '_') -> str:
1241+
def get_locale_identifier(
1242+
tup: tuple[str]
1243+
| tuple[str, str | None]
1244+
| tuple[str, str | None, str | None]
1245+
| tuple[str, str | None, str | None, str | None]
1246+
| tuple[str, str | None, str | None, str | None, str | None],
1247+
sep: str = "_",
1248+
) -> str:
12421249
"""The reverse of :func:`parse_locale`. It creates a locale identifier out
12431250
of a ``(language, territory, script, variant, modifier)`` tuple. Items can be set to
12441251
``None`` and trailing ``None``\\s can also be left out of the tuple.

0 commit comments

Comments
 (0)