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 (
1515 ClassVar ,
1616 Literal ,
1717 TypeAlias ,
18+ TypeVar ,
1819 final ,
1920 overload ,
2021)
@@ -65,6 +66,8 @@ from pandas._typing import (
6566 type_t ,
6667)
6768
69+ _T_INDEX = TypeVar ("_T_INDEX" , bound = Index ) # ty: ignore[unresolved-reference]
70+
6871class InvalidIndexError (Exception ): ...
6972
7073class Index (IndexOpsMixin [S1 ]):
@@ -407,6 +410,8 @@ class Index(IndexOpsMixin[S1]):
407410 @overload
408411 def append (self , other : Index [S2 ] | Sequence [Index [S2 ]]) -> Index [S1 | S2 ]: ...
409412 @overload
413+ def append (self , other : Sequence [_T_INDEX ]) -> Self | _T_INDEX : ...
414+ @overload
410415 def append (self , other : Index | Sequence ) -> Index : ...
411416 def putmask (self , mask , value ): ...
412417 def equals (self , other ) -> bool : ...
You can’t perform that action at this time.
0 commit comments