File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
pandas-stubs/core/indexes Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ from typing import (
15
15
ClassVar ,
16
16
Literal ,
17
17
TypeAlias ,
18
+ TypeVar ,
18
19
final ,
19
20
overload ,
20
21
)
@@ -65,6 +66,8 @@ from pandas._typing import (
65
66
type_t ,
66
67
)
67
68
69
+ _T_INDEX = TypeVar ("_T_INDEX" , bound = Index ) # ty: ignore[unresolved-reference]
70
+
68
71
class InvalidIndexError (Exception ): ...
69
72
70
73
class Index (IndexOpsMixin [S1 ]):
@@ -407,6 +410,8 @@ class Index(IndexOpsMixin[S1]):
407
410
@overload
408
411
def append (self , other : Index [S2 ] | Sequence [Index [S2 ]]) -> Index [S1 | S2 ]: ...
409
412
@overload
413
+ def append (self , other : Sequence [_T_INDEX ]) -> Self | _T_INDEX : ...
414
+ @overload
410
415
def append (self , other : Index | Sequence ) -> Index : ...
411
416
def putmask (self , mask , value ): ...
412
417
def equals (self , other ) -> bool : ...
You can’t perform that action at this time.
0 commit comments