File tree 1 file changed +6
-4
lines changed
pandas-stubs/core/indexes
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ from typing import (
9
9
ClassVar ,
10
10
Generic ,
11
11
Literal ,
12
+ TypeVar ,
12
13
overload ,
13
14
)
14
15
@@ -50,19 +51,20 @@ class InvalidIndexError(Exception): ...
50
51
51
52
_str = str
52
53
54
+ _IndexGetitemMixinT = TypeVar ("_IndexGetitemMixinT" , bound = _IndexGetitemMixin )
55
+
53
56
class _IndexGetitemMixin (Generic [S1 ]):
54
- # type ignore needed because it doesn't like the type of self
55
57
@overload
56
- def __getitem__ ( # type: ignore[misc]
57
- self : IndexT ,
58
+ def __getitem__ (
59
+ self : _IndexGetitemMixinT ,
58
60
idx : slice
59
61
| np_ndarray_anyint
60
62
| Sequence [int ]
61
63
| Index
62
64
| Series [bool ]
63
65
| Sequence [bool ]
64
66
| np_ndarray_bool ,
65
- ) -> IndexT : ...
67
+ ) -> _IndexGetitemMixinT : ...
66
68
@overload
67
69
def __getitem__ (self , idx : int ) -> S1 : ...
68
70
You can’t perform that action at this time.
0 commit comments