@@ -1596,14 +1596,12 @@ class Series(IndexOpsMixin[S1], NDFrame):
1596
1596
# just failed to generate these so I couldn't match
1597
1597
# them up.
1598
1598
@overload
1599
- def __add__ (
1600
- self : Series [int ],
1601
- other : int | np_ndarray_anyint | Series [int ] | Sequence [int ],
1602
- ) -> Series [int ]: ...
1599
+ def __add__ (self : Series [_T_INT ], other : _nonseries_int | Series [int ]) -> Series [_T_INT ]: ...
1603
1600
@overload
1604
1601
def __add__ (
1605
- self : Series [Timestamp ], other : _nonseries_timedelta | Series [Timedelta ]
1606
- ) -> Series [Timestamp ]: ...
1602
+ self : Series [_T_STAMP_AND_DELTA ],
1603
+ other : _nonseries_timedelta | Series [Timedelta ],
1604
+ ) -> Series [_T_STAMP_AND_DELTA ]: ...
1607
1605
@overload
1608
1606
def __add__ (self : Series [Timedelta ], other : Period ) -> PeriodSeries : ...
1609
1607
@overload
@@ -1612,10 +1610,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
1612
1610
other : datetime | Timestamp | Series [Timestamp ] | DatetimeIndex ,
1613
1611
) -> Series [Timestamp ]: ...
1614
1612
@overload
1615
- def __add__ (
1616
- self : Series [Timedelta ], other : timedelta | Timedelta | np .timedelta64
1617
- ) -> Series [Timedelta ]: ...
1618
- @overload
1619
1613
def __add__ (self , other : S1 | Self ) -> Self : ...
1620
1614
@overload
1621
1615
def __add__ (
@@ -1639,13 +1633,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1639
1633
@overload
1640
1634
def __floordiv__ (
1641
1635
self : Series [Timedelta ],
1642
- other : (
1643
- timedelta
1644
- | Series [Timedelta ]
1645
- | np .timedelta64
1646
- | TimedeltaIndex
1647
- | Sequence [timedelta ]
1648
- ),
1636
+ other : _nonseries_timedelta | Series [Timedelta ],
1649
1637
) -> Series [int ]: ...
1650
1638
@overload
1651
1639
def __floordiv__ (self , other : num | _ListLike | Series [S1 ]) -> Series [int ]: ...
@@ -1662,17 +1650,22 @@ class Series(IndexOpsMixin[S1], NDFrame):
1662
1650
self , other : S1 | _ListLike | Series [S1 ] | datetime | timedelta | date
1663
1651
) -> Series [_bool ]: ...
1664
1652
@overload
1653
+ def __mul__ (self : Series [_T_INT ], other : _nonseries_int | Series [int ]) -> Series [_T_INT ]: ...
1654
+ @overload
1665
1655
def __mul__ (
1666
- self : Series [_T_INT ], other : _nonseries_int | Series [int ]
1667
- ) -> Series [_T_INT ]: ...
1656
+ self : Series [_T_STAMP_AND_DELTA ],
1657
+ other : (
1658
+ num | Sequence [num ] | Series [int ] | Series [float ] | float | Sequence [float ]
1659
+ ),
1660
+ ) -> Series [_T_STAMP_AND_DELTA ]: ...
1668
1661
@overload
1669
1662
def __mul__ (
1670
- self : Series [Timedelta ],
1671
- other : num | Sequence [ num ] | Series [int ] | Series [ float ],
1672
- ) -> Series [ Timedelta ] : ...
1663
+ self : Series [_T_STAMP_AND_DELTA ],
1664
+ other : _nonseries_timedelta | Series [Timedelta ],
1665
+ ) -> Never : ...
1673
1666
@overload
1674
1667
def __mul__ (
1675
- self , other : timedelta | Timedelta | Series [Timedelta ] | np . timedelta64
1668
+ self , other : _nonseries_timedelta | Series [Timedelta ]
1676
1669
) -> Series [Timedelta ]: ...
1677
1670
@overload
1678
1671
def __mul__ (self , other : num | _ListLike | Series [S1 ]) -> Series [S1 ]: ...
@@ -1742,22 +1735,16 @@ class Series(IndexOpsMixin[S1], NDFrame):
1742
1735
self , other : bool | MaskType | list [int ]
1743
1736
) -> Series [bool ]: ...
1744
1737
@overload
1745
- def __rxor__ (self , other : int | np_ndarray_anyint | Series [int ]) -> Series [int ]: ...
1738
+ def __rxor__ (self , other : _nonseries_int | Series [int ]) -> Series [int ]: ...
1746
1739
@overload
1747
- def __sub__ (
1748
- self : Series [int ],
1749
- other : int | np_ndarray_anyint | Series [int ] | Sequence [int ],
1750
- ) -> Series [int ]: ...
1740
+ def __sub__ (self : Series [_T_INT ], other : _nonseries_int | Series [int ]) -> Series [_T_INT ]: ...
1751
1741
@overload
1752
1742
def __sub__ (
1753
1743
self : Series [Timestamp ], other : _nonseries_timedelta | Series [Timedelta ]
1754
1744
) -> Series [Timestamp ]: ...
1755
1745
@overload
1756
1746
def __sub__ (
1757
- self : Series [Timedelta ],
1758
- other : (
1759
- timedelta | Timedelta | Series [Timedelta ] | TimedeltaIndex | np .timedelta64
1760
- ),
1747
+ self , other : _nonseries_timedelta | Series [Timedelta ]
1761
1748
) -> Series [Timedelta ]: ...
1762
1749
@overload
1763
1750
def __sub__ (
@@ -1769,16 +1756,12 @@ class Series(IndexOpsMixin[S1], NDFrame):
1769
1756
def __truediv__ (
1770
1757
self : Series [_T_STAMP_AND_DELTA ],
1771
1758
other : float | Series [int ] | Series [float ] | Sequence [float ],
1772
- ) -> Series [Timestamp ]: ...
1759
+ ) -> Series [_T_STAMP_AND_DELTA ]: ...
1773
1760
@overload
1774
1761
def __truediv__ (
1775
1762
self : Series [Timedelta ], other : _nonseries_timedelta | Series [Timedelta ]
1776
1763
) -> Series [float ]: ...
1777
1764
@overload
1778
- def __truediv__ (
1779
- self : Series [Timedelta ], other : float | Sequence [float ]
1780
- ) -> Series [Timedelta ]: ...
1781
- @overload
1782
1765
def __truediv__ (self , other : num | _ListLike | Series [S1 ] | Path ) -> Series : ...
1783
1766
# ignore needed for mypy as we want different results based on the arguments
1784
1767
@overload # type: ignore[override]
0 commit comments