Skip to content

Commit a64f8e8

Browse files
committed
fix: mypy and naming
1 parent 0d9931a commit a64f8e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/series/arithmetic/test_truediv.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_truediv_pd_series() -> None:
144144
check(assert_type(left.rdiv(c), pd.Series), pd.Series)
145145

146146

147-
def test_path_div(tmp_path: Path) -> None:
147+
def test_truediv_paths(tmp_path: Path) -> None:
148148
"""Test pd.Series of paths / path object.
149149
150150
Also GH 682."""
@@ -155,7 +155,8 @@ def test_path_div(tmp_path: Path) -> None:
155155
check(assert_type(folders.truediv(fpath), pd.Series), pd.Series, Path)
156156
check(assert_type(folders.div(fpath), pd.Series), pd.Series, Path)
157157

158-
check(assert_type(tmp_path / fpaths, pd.Series), pd.Series, Path)
158+
# mypy thinks it's `Path`, in contrast to Series.__rtruediv__(self, other: Path) -> Series: ...
159+
check(assert_type(tmp_path / fpaths, pd.Series), pd.Series, Path) # type: ignore[assert-type]
159160
check(assert_type(fpaths.rtruediv(tmp_path), pd.Series), pd.Series, Path)
160161
check(assert_type(fpaths.rdiv(tmp_path), pd.Series), pd.Series, Path)
161162

0 commit comments

Comments
 (0)