Skip to content

Commit b05046e

Browse files
committed
weve got unknownindex, lets use it
1 parent 2a7349a commit b05046e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas-stubs/_libs/tslibs/timestamps.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ from datetime import _IsoCalendarDate # pyright: ignore[reportPrivateUsage]
1010
import sys
1111
from time import struct_time
1212
from typing import (
13-
Any,
1413
ClassVar,
1514
Literal,
1615
SupportsIndex,
@@ -20,9 +19,9 @@ from typing import (
2019
import numpy as np
2120
from pandas import (
2221
DatetimeIndex,
23-
Index,
2422
TimedeltaIndex,
2523
)
24+
from pandas.core.indexes.base import UnknownIndex
2625
from pandas.core.series import (
2726
Series,
2827
TimedeltaSeries,
@@ -236,15 +235,15 @@ class Timestamp(datetime, SupportsIndex):
236235
@overload
237236
def __eq__(self, other: TimestampSeries) -> Series[bool]: ... # type: ignore[overload-overlap]
238237
@overload
239-
def __eq__(self, other: npt.NDArray[np.datetime64] | Index[Any]) -> np_ndarray_bool: ... # type: ignore[overload-overlap]
238+
def __eq__(self, other: npt.NDArray[np.datetime64] | UnknownIndex) -> np_ndarray_bool: ... # type: ignore[overload-overlap]
240239
@overload
241240
def __eq__(self, other: object) -> Literal[False]: ...
242241
@overload
243242
def __ne__(self, other: Timestamp | datetime | np.datetime64) -> bool: ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
244243
@overload
245244
def __ne__(self, other: TimestampSeries) -> Series[bool]: ... # type: ignore[overload-overlap]
246245
@overload
247-
def __ne__(self, other: npt.NDArray[np.datetime64] | Index[Any]) -> np_ndarray_bool: ... # type: ignore[overload-overlap]
246+
def __ne__(self, other: npt.NDArray[np.datetime64] | UnknownIndex) -> np_ndarray_bool: ... # type: ignore[overload-overlap]
248247
@overload
249248
def __ne__(self, other: object) -> Literal[True]: ...
250249
def __hash__(self) -> int: ...

0 commit comments

Comments
 (0)