Skip to content

Commit 3a27b71

Browse files
committed
fix: #718 mypy and pyright
1 parent 31c2a90 commit 3a27b71

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas-stubs/core/series.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
17451745
self: Series[_T_INT], other: _nonseries_int | Series[int]
17461746
) -> Series[_T_INT]: ...
17471747
@overload
1748-
def __sub__(
1748+
def __sub__( # type: ignore[overload-overlap]
17491749
self: Series[Timestamp], other: _nonseries_timedelta | Series[Timedelta]
17501750
) -> Series[Timestamp]: ...
17511751
@overload

tests/test_timefuncs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,9 +1402,9 @@ def test_timedelta64_and_arithmatic_operator() -> None:
14021402
check(assert_type((s3 + td), "pd.Series[pd.Timedelta]"), pd.Series, pd.Timedelta)
14031403
check(assert_type((s3 / td), "pd.Series[float]"), pd.Series, float)
14041404
if TYPE_CHECKING_INVALID_USAGE:
1405-
r1 = s1 * td # pyright: ignore[reportOperatorIssue]
1406-
r2 = s1 / td # pyright: ignore[reportOperatorIssue]
1407-
r3 = s3 * td # pyright: ignore[reportOperatorIssue]
1405+
r1 = s1 * td # type: ignore[var-annotated]
1406+
r2 = s1 / td # type: ignore[operator] # pyright: ignore[reportOperatorIssue]
1407+
r3 = s3 * td # type: ignore[var-annotated]
14081408

14091409

14101410
def test_timedeltaseries_add_timestampseries() -> None:

0 commit comments

Comments
 (0)