Skip to content

Commit d3b8f16

Browse files
committed
fix for nightly numpy
1 parent 41a0fb6 commit d3b8f16

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

pandas-stubs/core/series.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,6 +1938,14 @@ class Series(IndexOpsMixin[S1], NDFrame):
19381938
axis: int = 0,
19391939
) -> Series[_str]: ...
19401940
@overload
1941+
def radd(
1942+
self: Series[S1],
1943+
other: Series[Never],
1944+
level: Level | None = None,
1945+
fill_value: float | None = None,
1946+
axis: int = 0,
1947+
) -> Series: ...
1948+
@overload
19411949
def radd(
19421950
self: Series[bool],
19431951
other: _T_COMPLEX | Sequence[_T_COMPLEX] | Series[_T_COMPLEX],

tests/series/arithmetic/str/test_add.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def test_add_py_scalar() -> None:
3131
check(assert_type(r0 + left, "pd.Series[str]"), pd.Series, str)
3232

3333
if TYPE_CHECKING_INVALID_USAGE:
34-
left.add(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
34+
left.add(i) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue]
3535
check(assert_type(left.add(r0), "pd.Series[str]"), pd.Series, str)
3636

3737
if TYPE_CHECKING_INVALID_USAGE:
38-
left.radd(i) # type: ignore[call-overload] # pyright: ignore[reportArgumentType]
38+
left.radd(i) # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue]
3939
check(assert_type(left.radd(r0), "pd.Series[str]"), pd.Series, str)
4040

4141

@@ -61,7 +61,7 @@ def test_add_py_sequence() -> None:
6161
check(assert_type(left.add(r1), "pd.Series[str]"), pd.Series, str)
6262

6363
if TYPE_CHECKING_INVALID_USAGE:
64-
left.radd(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType]
64+
left.radd(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
6565
check(assert_type(left.radd(r0), "pd.Series[str]"), pd.Series, str)
6666
check(assert_type(left.radd(r1), "pd.Series[str]"), pd.Series, str)
6767

@@ -96,7 +96,7 @@ def test_add_numpy_array() -> None:
9696
check(assert_type(left.add(r0), "pd.Series[str]"), pd.Series, str)
9797

9898
if TYPE_CHECKING_INVALID_USAGE:
99-
left.radd(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType]
99+
left.radd(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType, reportCallIssue]
100100
check(assert_type(left.radd(r0), "pd.Series[str]"), pd.Series, str)
101101

102102

@@ -118,5 +118,5 @@ def test_add_pd_series() -> None:
118118
check(assert_type(left.add(r0), "pd.Series[str]"), pd.Series, str)
119119

120120
if TYPE_CHECKING_INVALID_USAGE:
121-
left.radd(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType]
121+
left.radd(i) # type: ignore[arg-type] # pyright: ignore[reportArgumentType, reportCallIssue]
122122
check(assert_type(left.radd(r0), "pd.Series[str]"), pd.Series, str)

0 commit comments

Comments
 (0)