We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df8acf4 commit 49c2356Copy full SHA for 49c2356
pandas/_config/localization.py
@@ -43,11 +43,9 @@ def set_locale(
43
44
try:
45
locale.setlocale(lc_var, new_locale)
46
- normalized_locale = locale.getlocale()
47
- if all(x is not None for x in normalized_locale):
48
- # error: Argument 1 to "join" of "str" has incompatible type
49
- # "Tuple[Optional[str], Optional[str]]"; expected "Iterable[str]"
50
- yield ".".join(normalized_locale) # type: ignore[arg-type]
+ normalized_code, normalized_encoding = locale.getlocale()
+ if normalized_code is not None and normalized_encoding is not None:
+ yield ".".join((normalized_code, normalized_encoding))
51
else:
52
yield new_locale
53
finally:
0 commit comments