@@ -1620,19 +1620,16 @@ class Series(IndexOpsMixin[S1], NDFrame):
1620
1620
) -> Never : ...
1621
1621
@overload
1622
1622
def __add__ (
1623
- self : Series [Timestamp ], other : _nonseries_timedelta | Series [Timedelta ]
1624
- ) -> Series [Timestamp ]: ...
1623
+ self : Series [_T_STAMP_AND_DELTA ],
1624
+ other : _nonseries_timedelta | Series [Timedelta ],
1625
+ ) -> Series [_T_STAMP_AND_DELTA ]: ...
1625
1626
@overload
1626
1627
def __add__ (self : Series [Timedelta ], other : Period ) -> PeriodSeries : ...
1627
1628
@overload
1628
1629
def __add__ (
1629
1630
self : Series [Timedelta ], other : _nonseries_timestamp | Series [Timestamp ]
1630
1631
) -> Series [Timestamp ]: ...
1631
1632
@overload
1632
- def __add__ (
1633
- self : Series [Timedelta ], other : timedelta | Timedelta | np .timedelta64
1634
- ) -> Series [Timedelta ]: ...
1635
- @overload
1636
1633
def __add__ (self , other : S1 | Self ) -> Self : ...
1637
1634
@overload
1638
1635
def __add__ (
@@ -1656,13 +1653,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1656
1653
@overload
1657
1654
def __floordiv__ (
1658
1655
self : Series [Timedelta ],
1659
- other : (
1660
- timedelta
1661
- | Series [Timedelta ]
1662
- | np .timedelta64
1663
- | TimedeltaIndex
1664
- | Sequence [timedelta ]
1665
- ),
1656
+ other : _nonseries_timedelta | Series [Timedelta ],
1666
1657
) -> Series [int ]: ...
1667
1658
@overload
1668
1659
def __floordiv__ (self , other : num | _ListLike | Series [S1 ]) -> Series [int ]: ...
@@ -1679,17 +1670,22 @@ class Series(IndexOpsMixin[S1], NDFrame):
1679
1670
self , other : S1 | _ListLike | Series [S1 ] | datetime | timedelta | date
1680
1671
) -> Series [_bool ]: ...
1681
1672
@overload
1673
+ def __mul__ (self : Series [_T_INT ], other : _nonseries_int | Series [int ]) -> Series [_T_INT ]: ...
1674
+ @overload
1682
1675
def __mul__ (
1683
- self : Series [_T_INT ], other : _nonseries_int | Series [int ]
1684
- ) -> Series [_T_INT ]: ...
1676
+ self : Series [_T_STAMP_AND_DELTA ],
1677
+ other : (
1678
+ num | Sequence [num ] | Series [int ] | Series [float ] | float | Sequence [float ]
1679
+ ),
1680
+ ) -> Series [_T_STAMP_AND_DELTA ]: ...
1685
1681
@overload
1686
1682
def __mul__ (
1687
- self : Series [Timedelta ],
1688
- other : num | Sequence [ num ] | Series [int ] | Series [ float ],
1689
- ) -> Series [ Timedelta ] : ...
1683
+ self : Series [_T_STAMP_AND_DELTA ],
1684
+ other : _nonseries_timedelta | Series [Timedelta ],
1685
+ ) -> Never : ...
1690
1686
@overload
1691
1687
def __mul__ (
1692
- self , other : timedelta | Timedelta | Series [Timedelta ] | np . timedelta64
1688
+ self , other : _nonseries_timedelta | Series [Timedelta ]
1693
1689
) -> Series [Timedelta ]: ...
1694
1690
@overload
1695
1691
def __mul__ (self , other : num | _ListLike | Series [S1 ]) -> Series [S1 ]: ...
@@ -1759,22 +1755,16 @@ class Series(IndexOpsMixin[S1], NDFrame):
1759
1755
self , other : bool | MaskType | list [int ]
1760
1756
) -> Series [bool ]: ...
1761
1757
@overload
1762
- def __rxor__ (self , other : int | np_ndarray_anyint | Series [int ]) -> Series [int ]: ...
1758
+ def __rxor__ (self , other : _nonseries_int | Series [int ]) -> Series [int ]: ...
1763
1759
@overload
1764
- def __sub__ (
1765
- self : Series [int ],
1766
- other : int | np_ndarray_anyint | Series [int ] | Sequence [int ],
1767
- ) -> Series [int ]: ...
1760
+ def __sub__ (self : Series [_T_INT ], other : _nonseries_int | Series [int ]) -> Series [_T_INT ]: ...
1768
1761
@overload
1769
1762
def __sub__ (
1770
1763
self : Series [Timestamp ], other : _nonseries_timedelta | Series [Timedelta ]
1771
1764
) -> Series [Timestamp ]: ...
1772
1765
@overload
1773
1766
def __sub__ (
1774
- self : Series [Timedelta ],
1775
- other : (
1776
- timedelta | Timedelta | Series [Timedelta ] | TimedeltaIndex | np .timedelta64
1777
- ),
1767
+ self , other : _nonseries_timedelta | Series [Timedelta ]
1778
1768
) -> Series [Timedelta ]: ...
1779
1769
@overload
1780
1770
def __sub__ (
@@ -1786,16 +1776,12 @@ class Series(IndexOpsMixin[S1], NDFrame):
1786
1776
def __truediv__ (
1787
1777
self : Series [_T_STAMP_AND_DELTA ],
1788
1778
other : float | Series [int ] | Series [float ] | Sequence [float ],
1789
- ) -> Series [Timestamp ]: ...
1779
+ ) -> Series [_T_STAMP_AND_DELTA ]: ...
1790
1780
@overload
1791
1781
def __truediv__ (
1792
1782
self : Series [Timedelta ], other : _nonseries_timedelta | Series [Timedelta ]
1793
1783
) -> Series [float ]: ...
1794
1784
@overload
1795
- def __truediv__ (
1796
- self : Series [Timedelta ], other : float | Sequence [float ]
1797
- ) -> Series [Timedelta ]: ...
1798
- @overload
1799
1785
def __truediv__ (self , other : num | _ListLike | Series [S1 ] | Path ) -> Series : ...
1800
1786
# ignore needed for mypy as we want different results based on the arguments
1801
1787
@overload # type: ignore[override]
0 commit comments