@@ -1821,7 +1821,8 @@ class Series(IndexOpsMixin[S1], NDFrame):
1821
1821
def __radd__ (self : Series [Never ], other : Scalar | _ListLike ) -> Series : ...
1822
1822
@overload
1823
1823
def __radd__ (
1824
- self : Series [bool ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
1824
+ self : Series [bool ],
1825
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
1825
1826
) -> Series [_T_COMPLEX ]: ...
1826
1827
@overload
1827
1828
def __radd__ (self : Series [bool ], other : np_ndarray_bool ) -> Series [bool ]: ...
@@ -1830,45 +1831,51 @@ class Series(IndexOpsMixin[S1], NDFrame):
1830
1831
@overload
1831
1832
def __radd__ (self : Series [bool ], other : np_ndarray_float ) -> Series [float ]: ...
1832
1833
@overload
1833
- def __radd__ (self : Series [bool ], other : np_ndarray_complex ) -> Series [complex ]: ...
1834
- @overload
1835
1834
def __radd__ (
1836
1835
self : Series [int ],
1837
- other : bool | Sequence [bool ] | np_ndarray_bool | np_ndarray_anyint ,
1836
+ other : (
1837
+ bool | Sequence [bool ] | np_ndarray_bool | np_ndarray_anyint | Series [bool ]
1838
+ ),
1838
1839
) -> Series [int ]: ...
1839
1840
@overload
1840
1841
def __radd__ (
1841
- self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
1842
+ self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [ _T_COMPLEX ]
1842
1843
) -> Series [_T_COMPLEX ]: ...
1843
1844
@overload
1844
1845
def __radd__ (self : Series [int ], other : np_ndarray_float ) -> Series [float ]: ...
1845
1846
@overload
1846
- def __radd__ (self : Series [int ], other : np_ndarray_complex ) -> Series [complex ]: ...
1847
- @overload
1848
1847
def __radd__ (
1849
1848
self : Series [float ],
1850
1849
other : (
1851
- int | Sequence [int ] | np_ndarray_bool | np_ndarray_anyint | np_ndarray_float
1850
+ int
1851
+ | Sequence [int ]
1852
+ | np_ndarray_bool
1853
+ | np_ndarray_anyint
1854
+ | np_ndarray_float
1855
+ | Series [_T_INT ]
1852
1856
),
1853
1857
) -> Series [float ]: ...
1854
1858
@overload
1855
1859
def __radd__ (
1856
- self : Series [float ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
1860
+ self : Series [float ],
1861
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
1857
1862
) -> Series [_T_COMPLEX ]: ...
1858
1863
@overload
1859
- def __radd__ (self : Series [float ], other : np_ndarray_complex ) -> Series [complex ]: ...
1860
- @overload
1861
1864
def __radd__ (
1862
1865
self : Series [complex ],
1863
1866
other : (
1864
- np_ndarray_bool
1867
+ Sequence [_T_COMPLEX ]
1868
+ | np_ndarray_bool
1865
1869
| np_ndarray_anyint
1866
1870
| np_ndarray_float
1867
- | np_ndarray_complex
1868
- | Sequence [_T_COMPLEX ]
1871
+ | Series [_T_COMPLEX ]
1869
1872
),
1870
1873
) -> Series [complex ]: ...
1871
1874
@overload
1875
+ def __radd__ (
1876
+ self : Series [_T_COMPLEX ], other : np_ndarray_complex
1877
+ ) -> Series [complex ]: ...
1878
+ @overload
1872
1879
def __radd__ (self , other : S1 ) -> Self : ...
1873
1880
@overload
1874
1881
def radd (
@@ -1895,14 +1902,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
1895
1902
axis : int = 0 ,
1896
1903
) -> Series [bool ]: ...
1897
1904
@overload
1898
- def radd (
1899
- self : Series [bool ],
1900
- other : np_ndarray_anyint ,
1901
- level : Level | None = None ,
1902
- fill_value : float | None = None ,
1903
- axis : int = 0 ,
1904
- ) -> Series [int ]: ...
1905
- @overload
1906
1905
def radd (
1907
1906
self : Series [bool ],
1908
1907
other : np_ndarray_float ,
@@ -1913,11 +1912,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
1913
1912
@overload
1914
1913
def radd (
1915
1914
self : Series [bool ],
1916
- other : np_ndarray_complex ,
1915
+ other : np_ndarray_anyint ,
1917
1916
level : Level | None = None ,
1918
1917
fill_value : float | None = None ,
1919
1918
axis : int = 0 ,
1920
- ) -> Series [complex ]: ...
1919
+ ) -> Series [int ]: ...
1921
1920
@overload
1922
1921
def radd (
1923
1922
self : Series [int ],
@@ -1945,14 +1944,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
1945
1944
axis : int = 0 ,
1946
1945
) -> Series [float ]: ...
1947
1946
@overload
1948
- def radd (
1949
- self : Series [int ],
1950
- other : np_ndarray_complex ,
1951
- level : Level | None = None ,
1952
- fill_value : float | None = None ,
1953
- axis : int = 0 ,
1954
- ) -> Series [complex ]: ...
1955
- @overload
1956
1947
def radd (
1957
1948
self : Series [float ],
1958
1949
other : (
@@ -1976,29 +1967,28 @@ class Series(IndexOpsMixin[S1], NDFrame):
1976
1967
axis : int = 0 ,
1977
1968
) -> Series [_T_COMPLEX ]: ...
1978
1969
@overload
1979
- def radd (
1980
- self : Series [float ],
1981
- other : np_ndarray_complex ,
1982
- level : Level | None = None ,
1983
- fill_value : float | None = None ,
1984
- axis : int = 0 ,
1985
- ) -> Series [complex ]: ...
1986
- @overload
1987
1970
def radd (
1988
1971
self : Series [complex ],
1989
1972
other : (
1990
1973
Sequence [_T_COMPLEX ]
1991
1974
| np_ndarray_bool
1992
1975
| np_ndarray_anyint
1993
1976
| np_ndarray_float
1994
- | np_ndarray_complex
1995
1977
| Series [_T_COMPLEX ]
1996
1978
),
1997
1979
level : Level | None = None ,
1998
1980
fill_value : float | None = None ,
1999
1981
axis : int = 0 ,
2000
1982
) -> Series [complex ]: ...
2001
1983
@overload
1984
+ def radd (
1985
+ self : Series [_T_COMPLEX ],
1986
+ other : np_ndarray_complex ,
1987
+ level : Level | None = None ,
1988
+ fill_value : float | None = None ,
1989
+ axis : int = 0 ,
1990
+ ) -> Series [complex ]: ...
1991
+ @overload
2002
1992
def radd (
2003
1993
self ,
2004
1994
other : S1 | Series [S1 ],
@@ -2293,39 +2283,61 @@ class Series(IndexOpsMixin[S1], NDFrame):
2293
2283
) -> Series : ...
2294
2284
div = truediv
2295
2285
@overload
2296
- def __rtruediv__ (self : Series [Never ], other : complex | _ListLike ) -> Series : ...
2286
+ def __rtruediv__ (
2287
+ self : Series [Never ], other : complex | _ListLike | Series
2288
+ ) -> Series : ...
2289
+ @overload
2290
+ def __rtruediv__ (self , other : Series [Never ]) -> Series : ...
2297
2291
@overload
2298
2292
def __rtruediv__ (self : Series [bool ], other : bool | np_ndarray_bool ) -> Never : ...
2299
2293
@overload
2300
2294
def __rtruediv__ ( # pyright: ignore[reportOverlappingOverload]
2301
2295
self : Series [bool ],
2302
- other : float | Sequence [float ] | np_ndarray_anyint | np_ndarray_float ,
2296
+ other : (
2297
+ float
2298
+ | Sequence [float ]
2299
+ | np_ndarray_anyint
2300
+ | np_ndarray_float
2301
+ | Series [int ]
2302
+ | Series [float ]
2303
+ ),
2303
2304
) -> Series [float ]: ...
2304
2305
@overload
2305
2306
def __rtruediv__ (
2306
- self : Series [bool ], other : complex | Sequence [complex ]
2307
+ self : Series [bool ], other : complex | Sequence [complex ] | Series [ complex ]
2307
2308
) -> Series [complex ]: ...
2308
2309
@overload
2309
2310
def __rtruediv__ (
2310
2311
self : Series [int ],
2311
2312
other : (
2312
- int | Sequence [int ] | np_ndarray_bool | np_ndarray_anyint | np_ndarray_float
2313
+ int
2314
+ | Sequence [int ]
2315
+ | np_ndarray_bool
2316
+ | np_ndarray_anyint
2317
+ | np_ndarray_float
2318
+ | Series [_T_INT ]
2313
2319
),
2314
2320
) -> Series [float ]: ...
2315
2321
@overload
2316
2322
def __rtruediv__ (
2317
- self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
2323
+ self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [ _T_COMPLEX ]
2318
2324
) -> Series [_T_COMPLEX ]: ...
2319
2325
@overload
2320
2326
def __rtruediv__ (
2321
2327
self : Series [float ],
2322
2328
other : (
2323
- int | Sequence [int ] | np_ndarray_bool | np_ndarray_anyint | np_ndarray_float
2329
+ int
2330
+ | Sequence [int ]
2331
+ | np_ndarray_bool
2332
+ | np_ndarray_anyint
2333
+ | np_ndarray_float
2334
+ | Series [_T_INT ]
2324
2335
),
2325
2336
) -> Series [float ]: ...
2326
2337
@overload
2327
2338
def __rtruediv__ (
2328
- self : Series [float ], other : _T_COMPLEX | Sequence [_T_COMPLEX ]
2339
+ self : Series [float ],
2340
+ other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ],
2329
2341
) -> Series [_T_COMPLEX ]: ...
2330
2342
@overload
2331
2343
def __rtruediv__ (
@@ -2336,6 +2348,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
2336
2348
| np_ndarray_bool
2337
2349
| np_ndarray_anyint
2338
2350
| np_ndarray_float
2351
+ | Series [_T_COMPLEX ]
2339
2352
),
2340
2353
) -> Series [complex ]: ...
2341
2354
@overload
@@ -3112,7 +3125,7 @@ class PeriodSeries(Series[Period]):
3112
3125
) -> Never : ...
3113
3126
3114
3127
class OffsetSeries (Series [BaseOffset ]):
3115
- @overload
3128
+ @overload # type: ignore[override]
3116
3129
def __radd__ (self , other : Period ) -> PeriodSeries : ...
3117
3130
@overload
3118
3131
def __radd__ ( # pyright: ignore[reportIncompatibleMethodOverride]
0 commit comments