Skip to content

Commit 3844062

Browse files
committed
fix(comment): #1282 (comment)
1 parent 6c8ba76 commit 3844062

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas-stubs/core/indexes/base.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
6871
class InvalidIndexError(Exception): ...
6972

7073
class 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: ...

0 commit comments

Comments
 (0)