Skip to content

Commit 49c2356

Browse files
committed
TYP: remove mypy ignore from localization.py
1 parent df8acf4 commit 49c2356

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/_config/localization.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ def set_locale(
4343

4444
try:
4545
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]
46+
normalized_code, normalized_encoding = locale.getlocale()
47+
if normalized_code is not None and normalized_encoding is not None:
48+
yield ".".join((normalized_code, normalized_encoding))
5149
else:
5250
yield new_locale
5351
finally:

0 commit comments

Comments
 (0)