@@ -1624,10 +1624,10 @@ class Series(IndexOpsMixin[S1], NDFrame):
1624
1624
@overload
1625
1625
def __add__ (
1626
1626
self : Series [Never ],
1627
- other : num | _str | timedelta | Timedelta | _ListLike | Series | np . timedelta64 ,
1627
+ other : Scalar | _ListLike | Series ,
1628
1628
) -> Series : ...
1629
1629
@overload
1630
- def __add__ (self : Series , other : Series [Never ]) -> Series : ...
1630
+ def __add__ (self , other : Series [Never ]) -> Series : ...
1631
1631
@overload
1632
1632
def __add__ (
1633
1633
self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ]
@@ -1664,11 +1664,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
1664
1664
) -> Series [complex ]: ...
1665
1665
@overload
1666
1666
def __add__ (self , other : S1 | Self ) -> Self : ...
1667
- @overload
1668
- def __add__ (
1669
- self ,
1670
- other : num | _str | timedelta | Timedelta | _ListLike | Series | np .timedelta64 ,
1671
- ) -> Series : ...
1672
1667
# ignore needed for mypy as we want different results based on the arguments
1673
1668
@overload # type: ignore[override]
1674
1669
def __and__ ( # pyright: ignore[reportOverlappingOverload]
@@ -1709,9 +1704,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1709
1704
@overload
1710
1705
def __or__ (self , other : int | np_ndarray_anyint | Series [int ]) -> Series [int ]: ...
1711
1706
@overload
1712
- def __radd__ (
1713
- self : Series [Never ], other : num | _str | _ListLike | Series
1714
- ) -> Series : ...
1707
+ def __radd__ (self : Series [Never ], other : Scalar | _ListLike | Series ) -> Series : ...
1715
1708
@overload
1716
1709
def __radd__ (
1717
1710
self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
@@ -1728,8 +1721,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
1728
1721
) -> Series [complex ]: ...
1729
1722
@overload
1730
1723
def __radd__ (self , other : S1 | Series [S1 ]) -> Self : ...
1731
- @overload
1732
- def __radd__ (self , other : num | _str | _ListLike | Series ) -> Series : ...
1733
1724
# ignore needed for mypy as we want different results based on the arguments
1734
1725
@overload # type: ignore[override]
1735
1726
def __rand__ ( # pyright: ignore[reportOverlappingOverload]
@@ -1808,14 +1799,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1808
1799
@overload
1809
1800
def add (
1810
1801
self : Series [Never ],
1811
- other : (
1812
- Sequence
1813
- | np_ndarray_anyint
1814
- | np_ndarray_float
1815
- | np_ndarray_complex
1816
- | Series
1817
- | Scalar
1818
- ),
1802
+ other : Scalar | _ListLike | Series ,
1819
1803
level : Level | None = ...,
1820
1804
fill_value : float | None = ...,
1821
1805
axis : int = ...,
@@ -1893,11 +1877,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
1893
1877
@overload
1894
1878
def add (
1895
1879
self ,
1896
- other : Series [ S1 ] | Scalar ,
1880
+ other : S1 | Series [ S1 ] ,
1897
1881
level : Level | None = ...,
1898
1882
fill_value : float | None = ...,
1899
1883
axis : int = ...,
1900
- ) -> Series [ S1 ] : ...
1884
+ ) -> Self : ...
1901
1885
def all (
1902
1886
self ,
1903
1887
axis : AxisIndex = ...,
@@ -2138,14 +2122,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2138
2122
@overload
2139
2123
def radd (
2140
2124
self : Series [Never ],
2141
- other : (
2142
- Sequence
2143
- | np_ndarray_anyint
2144
- | np_ndarray_float
2145
- | np_ndarray_complex
2146
- | Series
2147
- | Scalar
2148
- ),
2125
+ other : Scalar | _ListLike | Series ,
2149
2126
level : Level | None = ...,
2150
2127
fill_value : float | None = ...,
2151
2128
axis : AxisIndex = ...,
@@ -2223,11 +2200,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
2223
2200
@overload
2224
2201
def radd (
2225
2202
self ,
2226
- other : Series [ S1 ] | Scalar ,
2203
+ other : S1 | Series [ S1 ] ,
2227
2204
level : Level | None = ...,
2228
2205
fill_value : float | None = ...,
2229
2206
axis : AxisIndex = ...,
2230
- ) -> Series [ S1 ] : ...
2207
+ ) -> Self : ...
2231
2208
def rdivmod (
2232
2209
self ,
2233
2210
other : Series [S1 ] | Scalar ,
0 commit comments