Skip to content

Commit c0b659a

Browse files
authored
TYP: remove mypy ignore from localization.py (#47240)
* TYP: remove mypy ignore from localization.py * fixup! TYP: remove mypy ignore from localization.py
1 parent 9e10206 commit c0b659a

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 f"{normalized_code}.{normalized_encoding}"
5149
else:
5250
yield new_locale
5351
finally:

0 commit comments

Comments
 (0)