Skip to content

Commit 34703d7

Browse files
committed
feat: sub
1 parent 0359fd5 commit 34703d7

File tree

1 file changed

+36
-8
lines changed

1 file changed

+36
-8
lines changed

pandas-stubs/core/series.pyi

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,10 +1669,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
16691669
| np_ndarray_complex
16701670
),
16711671
) -> Series[complex]: ...
1672-
# @overload
1673-
# def __add__(
1674-
# self: Series[Timestamp], other: _nonseries_timestamp # | Series[Timestamp]
1675-
# ) -> Never: ...
16761672
@overload
16771673
def __add__(
16781674
self: Series[Timestamp],
@@ -2007,6 +2003,42 @@ class Series(IndexOpsMixin[S1], NDFrame):
20072003
@overload
20082004
def __sub__(self: Series[Never], other: num | _ListLike | Series) -> Series: ...
20092005
@overload
2006+
def __sub__(self: Series[S1C], other: Series[Never]) -> Series: ...
2007+
@overload
2008+
def __sub__(
2009+
self: Series[int], other: _T_COMPLEX | Sequence[_T_COMPLEX] | Series[_T_COMPLEX]
2010+
) -> Series[_T_COMPLEX]: ...
2011+
@overload
2012+
def __sub__(self: Series[int], other: np_ndarray_anyint) -> Series[int]: ...
2013+
@overload
2014+
def __sub__(self: Series[int], other: np_ndarray_float) -> Series[float]: ...
2015+
@overload
2016+
def __sub__(self: Series[int], other: np_ndarray_complex) -> Series[complex]: ...
2017+
@overload
2018+
def __sub__(
2019+
self: Series[float],
2020+
other: int | Sequence[int] | np_ndarray_anyint | np_ndarray_float | Series[int],
2021+
) -> Series[float]: ...
2022+
@overload
2023+
def __sub__(
2024+
self: Series[float],
2025+
other: _T_COMPLEX | Sequence[_T_COMPLEX] | Series[_T_COMPLEX],
2026+
) -> Series[_T_COMPLEX]: ...
2027+
@overload
2028+
def __sub__(self: Series[float], other: np_ndarray_complex) -> Series[complex]: ...
2029+
@overload
2030+
def __sub__(
2031+
self: Series[complex],
2032+
other: (
2033+
_T_COMPLEX
2034+
| Sequence[_T_COMPLEX]
2035+
| Series[_T_COMPLEX]
2036+
| np_ndarray_anyint
2037+
| np_ndarray_float
2038+
| np_ndarray_complex
2039+
),
2040+
) -> Series[complex]: ...
2041+
@overload
20102042
def __sub__(
20112043
self: Series[Timestamp], other: _nonseries_timedelta | TimedeltaSeries
20122044
) -> Series[Timestamp]: ...
@@ -2015,10 +2047,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
20152047
self: Series[Timestamp], other: _nonseries_timestamp | Series[Timestamp]
20162048
) -> TimedeltaSeries: ...
20172049
@overload
2018-
def __sub__(self, other: S1 | Self) -> Self: ...
2019-
@overload
2020-
def __sub__(self, other: num | _ListLike | Series) -> Series: ...
2021-
@overload
20222050
def __truediv__(
20232051
self: Series[Never], other: Scalar | _ListLike | Series
20242052
) -> Series: ...

0 commit comments

Comments
 (0)