Skip to content

Commit 92dc75d

Browse files
committed
use Mapping instead of dict as it is invariant
1 parent e40d245 commit 92dc75d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_series.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from collections.abc import (
44
Iterable,
55
Iterator,
6+
Mapping,
67
Sequence,
78
)
89
import datetime
@@ -1658,10 +1659,9 @@ def test_string_accessors():
16581659
check(assert_type(s.str.strip(), "pd.Series[str]"), pd.Series, str)
16591660
check(assert_type(s.str.swapcase(), "pd.Series[str]"), pd.Series, str)
16601661
check(assert_type(s.str.title(), "pd.Series[str]"), pd.Series, str)
1662+
translation_table: Mapping = str.maketrans({"ñ": "n", "ç": "c"})
16611663
check(
1662-
assert_type(
1663-
s.str.translate(str.maketrans({"ñ": "n", "ç": "c"})), "pd.Series[str]"
1664-
),
1664+
assert_type(s.str.translate(translation_table), "pd.Series[str]"),
16651665
pd.Series,
16661666
str,
16671667
)

0 commit comments

Comments
 (0)