File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
pandas-stubs/_libs/tslibs Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ class Timedelta(timedelta):
170
170
@overload
171
171
def __add__ (
172
172
self ,
173
- other : TimedeltaSeries | Series [ pd . Timedelta ] ,
173
+ other : TimedeltaSeries ,
174
174
) -> TimedeltaSeries : ...
175
175
@overload
176
176
def __add__ (self , other : TimestampSeries ) -> TimestampSeries : ...
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ class Timestamp(datetime):
189
189
) -> _DatetimeT : ...
190
190
@overload
191
191
def __add__ (
192
- self , other : TimedeltaSeries | Series [ Timedelta ]
192
+ self , other : TimedeltaSeries
193
193
) -> TimestampSeries : ...
194
194
@overload
195
195
def __add__ (self , other : TimedeltaIndex ) -> DatetimeIndex : ...
@@ -219,15 +219,15 @@ class Timestamp(datetime):
219
219
@overload
220
220
def __eq__ (self , other : Timestamp | datetime | np .datetime64 ) -> bool : ... # type: ignore[misc] # pyright: ignore[reportOverlappingOverload]
221
221
@overload
222
- def __eq__ (self , other : TimestampSeries | Series [Timestamp ]) -> Series [bool ]: ... # type: ignore[misc]
222
+ def __eq__ (self , other : TimestampSeries | Series [np . datetime64 ]) -> Series [bool ]: ... # type: ignore[misc]
223
223
@overload
224
224
def __eq__ (self , other : npt .NDArray [np .datetime64 ] | Index ) -> np_ndarray_bool : ... # type: ignore[misc]
225
225
@overload
226
226
def __eq__ (self , other : object ) -> Literal [False ]: ...
227
227
@overload
228
228
def __ne__ (self , other : Timestamp | datetime | np .datetime64 ) -> bool : ... # type: ignore[misc] # pyright: ignore[reportOverlappingOverload]
229
229
@overload
230
- def __ne__ (self , other : TimestampSeries | Series [Timestamp ]) -> Series [bool ]: ... # type: ignore[misc]
230
+ def __ne__ (self , other : TimestampSeries | Series [np . datetime64 ]) -> Series [bool ]: ... # type: ignore[misc]
231
231
@overload
232
232
def __ne__ (self , other : npt .NDArray [np .datetime64 ] | Index ) -> np_ndarray_bool : ... # type: ignore[misc]
233
233
@overload
Original file line number Diff line number Diff line change @@ -1256,9 +1256,7 @@ def test_timestamp_cmp() -> None:
1256
1256
c_dt_datetime = dt .datetime (year = 2000 , month = 1 , day = 1 )
1257
1257
c_datetimeindex = pd .DatetimeIndex (["2000-1-1" ])
1258
1258
c_np_ndarray_dt64 = np_dt64_arr
1259
- # Typing provided since there is no way to get a Series[Timestamp],
1260
- # which is a different type from a TimestampSeries
1261
- c_series_dt64 : pd .Series [pd .Timestamp ] = pd .Series (
1259
+ c_series_dt64 : pd .Series [np .datetime64 ] = pd .Series (
1262
1260
[1 , 2 , 3 ], dtype = "datetime64[ns]"
1263
1261
)
1264
1262
c_series_timestamp = pd .Series (pd .DatetimeIndex (["2000-1-1" ]))
You can’t perform that action at this time.
0 commit comments