Skip to content

Commit 5cadf31

Browse files
committed
req. changes
1 parent dad2902 commit 5cadf31

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

pandas-stubs/_libs/tslibs/timedeltas.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class Timedelta(timedelta):
170170
@overload
171171
def __add__(
172172
self,
173-
other: TimedeltaSeries | Series[pd.Timedelta],
173+
other: TimedeltaSeries,
174174
) -> TimedeltaSeries: ...
175175
@overload
176176
def __add__(self, other: TimestampSeries) -> TimestampSeries: ...

pandas-stubs/_libs/tslibs/timestamps.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Timestamp(datetime):
189189
) -> _DatetimeT: ...
190190
@overload
191191
def __add__(
192-
self, other: TimedeltaSeries | Series[Timedelta]
192+
self, other: TimedeltaSeries
193193
) -> TimestampSeries: ...
194194
@overload
195195
def __add__(self, other: TimedeltaIndex) -> DatetimeIndex: ...
@@ -219,15 +219,15 @@ class Timestamp(datetime):
219219
@overload
220220
def __eq__(self, other: Timestamp | datetime | np.datetime64) -> bool: ... # type: ignore[misc] # pyright: ignore[reportOverlappingOverload]
221221
@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]
223223
@overload
224224
def __eq__(self, other: npt.NDArray[np.datetime64] | Index) -> np_ndarray_bool: ... # type: ignore[misc]
225225
@overload
226226
def __eq__(self, other: object) -> Literal[False]: ...
227227
@overload
228228
def __ne__(self, other: Timestamp | datetime | np.datetime64) -> bool: ... # type: ignore[misc] # pyright: ignore[reportOverlappingOverload]
229229
@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]
231231
@overload
232232
def __ne__(self, other: npt.NDArray[np.datetime64] | Index) -> np_ndarray_bool: ... # type: ignore[misc]
233233
@overload

tests/test_scalars.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,9 +1256,7 @@ def test_timestamp_cmp() -> None:
12561256
c_dt_datetime = dt.datetime(year=2000, month=1, day=1)
12571257
c_datetimeindex = pd.DatetimeIndex(["2000-1-1"])
12581258
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(
12621260
[1, 2, 3], dtype="datetime64[ns]"
12631261
)
12641262
c_series_timestamp = pd.Series(pd.DatetimeIndex(["2000-1-1"]))

0 commit comments

Comments
 (0)