@@ -18,10 +18,7 @@ from pandas.core.series import (
18
18
TimedeltaSeries ,
19
19
TimestampSeries ,
20
20
)
21
- from typing_extensions import (
22
- Never ,
23
- TypeAlias ,
24
- )
21
+ from typing_extensions import TypeAlias
25
22
26
23
from pandas ._libs .interval import (
27
24
Interval as Interval ,
@@ -260,31 +257,29 @@ class IntervalIndex(IntervalMixin, ExtensionIndex, Generic[IntervalT]):
260
257
# override is due to additional types for comparison
261
258
# misc is due to overlap with object below
262
259
@overload # type: ignore[override]
263
- def __gt__ ( # type: ignore[misc]
260
+ def __gt__ (
264
261
self , other : IntervalT | IntervalIndex [IntervalT ]
265
262
) -> np_ndarray_bool : ...
266
263
@overload
267
- def __gt__ (self , other : pd .Series [IntervalT ]) -> pd .Series [bool ]: ... # type: ignore[misc]
268
- @overload
269
- def __gt__ (self , other : object ) -> Never : ...
264
+ def __gt__ (self , other : pd .Series [IntervalT ]) -> pd .Series [bool ]: ...
270
265
@overload # type: ignore[override]
271
- def __ge__ (self , other : IntervalT | IntervalIndex [ IntervalT ]) -> np_ndarray_bool : ... # type: ignore[misc]
272
- @ overload
273
- def __ge__ ( self , other : pd . Series [ IntervalT ] ) -> pd . Series [ bool ] : ... # type: ignore[misc]
266
+ def __ge__ (
267
+ self , other : IntervalT | IntervalIndex [ IntervalT ]
268
+ ) -> np_ndarray_bool : ...
274
269
@overload
275
- def __ge__ (self , other : object ) -> Never : ...
270
+ def __ge__ (self , other : pd . Series [ IntervalT ] ) -> pd . Series [ bool ] : ...
276
271
@overload # type: ignore[override]
277
- def __le__ (self , other : IntervalT | IntervalIndex [ IntervalT ]) -> np_ndarray_bool : ... # type: ignore[misc]
278
- @ overload
279
- def __le__ ( self , other : pd . Series [ IntervalT ] ) -> pd . Series [ bool ] : ... # type: ignore[misc]
272
+ def __le__ (
273
+ self , other : IntervalT | IntervalIndex [ IntervalT ]
274
+ ) -> np_ndarray_bool : ...
280
275
@overload
281
- def __le__ (self , other : object ) -> Never : ...
276
+ def __le__ (self , other : pd . Series [ IntervalT ] ) -> pd . Series [ bool ] : ...
282
277
@overload # type: ignore[override]
283
- def __lt__ (self , other : IntervalT | IntervalIndex [IntervalT ]) -> np_ndarray_bool : ... # type: ignore[misc]
278
+ def __lt__ (
279
+ self , other : IntervalT | IntervalIndex [IntervalT ]
280
+ ) -> np_ndarray_bool : ...
284
281
@overload
285
282
def __lt__ (self , other : pd .Series [IntervalT ]) -> bool : ... # type: ignore[misc]
286
- @overload
287
- def __lt__ (self , other : object ) -> Never : ...
288
283
@overload # type: ignore[override]
289
284
def __eq__ (self , other : IntervalT | IntervalIndex [IntervalT ]) -> np_ndarray_bool : ... # type: ignore[misc]
290
285
@overload
0 commit comments