@@ -104,6 +104,7 @@ from pandas._libs.tslibs.nattype import NaTType
104104from pandas ._libs .tslibs .offsets import DateOffset
105105from pandas ._typing import (
106106 S1 ,
107+ S1C ,
107108 S2 ,
108109 AggFuncTypeBase ,
109110 AggFuncTypeDictFrame ,
@@ -186,29 +187,26 @@ from pandas.core.dtypes.dtypes import CategoricalDtype
186187
187188from pandas .plotting import PlotAccessor
188189
189- _T_FLOAT = TypeVar ("_T_FLOAT" , bound = float )
190190_T_COMPLEX = TypeVar ("_T_COMPLEX" , bound = complex )
191191
192- _scalar_timestamp : TypeAlias = datetime | np .datetime64 | Timestamp
192+ _scalar_timestamp : TypeAlias = date | datetime | np .datetime64
193193_vector_timestamp : TypeAlias = (
194- Sequence [datetime ]
194+ Sequence [date ]
195+ | Sequence [datetime ]
195196 | Sequence [np .datetime64 ]
196- | Sequence [Timestamp ]
197197 | np .typing .NDArray [np .datetime64 ]
198198 | DatetimeIndex
199199)
200200_nonseries_timestamp : TypeAlias = _scalar_timestamp | _vector_timestamp
201201
202- _scalar_timedelta : TypeAlias = timedelta | np .timedelta64 | BaseOffset | Timedelta
202+ _scalar_timedelta : TypeAlias = timedelta | np .timedelta64 | BaseOffset
203203_vector_timedelta : TypeAlias = (
204204 Sequence [timedelta ]
205205 | Sequence [np .timedelta64 ]
206- | Sequence [Timedelta ]
207206 | np .typing .NDArray [np .timedelta64 ]
208207 | TimedeltaIndex
209208)
210209_nonseries_timedelta : TypeAlias = _scalar_timedelta | _vector_timedelta
211- _T_TIMESTAMP = TypeVar ("_T_TIMESTAMP" , bound = Timestamp )
212210
213211class _iLocIndexerSeries (_iLocIndexer , Generic [S1 ]):
214212 # get item
@@ -1634,9 +1632,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
16341632 # just failed to generate these so I couldn't match
16351633 # them up.
16361634 @overload
1637- def __add__ (self : Series [Never ], other : Scalar | _ListLike | Series ) -> Series : ... # type: ignore[overload-overlap]
1635+ def __add__ (self : Series [Never ], other : Scalar | _ListLike | Series ) -> Series : ...
16381636 @overload
1639- def __add__ (self , other : Series [Never ]) -> Series : ...
1637+ def __add__ (self : Series [ S1C ] , other : Series [Never ]) -> Series : ...
16401638 @overload
16411639 def __add__ (
16421640 self : Series [int ], other : _T_COMPLEX | Sequence [_T_COMPLEX ] | Series [_T_COMPLEX ]
@@ -1671,10 +1669,10 @@ class Series(IndexOpsMixin[S1], NDFrame):
16711669 | np_ndarray_complex
16721670 ),
16731671 ) -> Series [complex ]: ...
1674- @overload
1675- def __add__ (
1676- self : Series [Timestamp ], other : _nonseries_timestamp # | Series[Timestamp]
1677- ) -> Never : ...
1672+ # @overload
1673+ # def __add__(
1674+ # self: Series[Timestamp], other: _nonseries_timestamp # | Series[Timestamp]
1675+ # ) -> Never: ...
16781676 @overload
16791677 def __add__ (
16801678 self : Series [Timestamp ],
@@ -1687,7 +1685,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
16871685 self : Series [Timedelta ], other : _nonseries_timestamp | Series [Timestamp ]
16881686 ) -> Series [Timestamp ]: ...
16891687 @overload
1690- def __add__ (self , other : S1 | Series [S1 ]) -> Self : ...
1688+ def __add__ (self : Series [ S1C ] , other : S1C | Series [S1C ]) -> Series [ S1C ] : ...
16911689 @overload
16921690 def add (
16931691 self : Series [Never ],
@@ -1937,7 +1935,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
19371935 @overload
19381936 def __mul__ (self : Series [Never ], other : num | _ListLike | Series ) -> Series : ...
19391937 @overload
1940- def __mul__ (self , other : Series [Never ]) -> Series : ... # type: ignore[overload-overlap]
1938+ def __mul__ (self : Series [ S1C ] , other : Series [Never ]) -> Series : ... # type: ignore[overload-overlap]
19411939 @overload
19421940 def __mul__ (
19431941 self : Series [int ], other : _T_COMPLEX | Series [_T_COMPLEX ]
@@ -1955,7 +1953,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
19551953 ) -> Never : ...
19561954 @overload
19571955 def __mul__ (
1958- self : Series [ _T_FLOAT ] , other : _nonseries_timedelta | TimedeltaSeries
1956+ self , other : timedelta | Timedelta | TimedeltaSeries | np . timedelta64
19591957 ) -> TimedeltaSeries : ...
19601958 @overload
19611959 def __mul__ (self , other : num | _ListLike | Series ) -> Series : ...
@@ -2014,7 +2012,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
20142012 ) -> Series [Timestamp ]: ...
20152013 @overload
20162014 def __sub__ (
2017- self : Series [Timestamp ], other : _nonseries_timestamp | Series [_T_TIMESTAMP ]
2015+ self : Series [Timestamp ], other : _nonseries_timestamp | Series [Timestamp ]
20182016 ) -> TimedeltaSeries : ...
20192017 @overload
20202018 def __sub__ (self , other : S1 | Self ) -> Self : ...
0 commit comments