File tree 7 files changed +214
-224
lines changed
7 files changed +214
-224
lines changed Original file line number Diff line number Diff line change 6
6
tzinfo ,
7
7
)
8
8
from os import PathLike
9
+ import sys
9
10
from typing import (
10
11
TYPE_CHECKING ,
11
12
Any ,
83
84
# Name "npt._ArrayLikeInt_co" is not defined [name-defined]
84
85
NumpySorter = Optional [npt ._ArrayLikeInt_co ] # type: ignore[name-defined]
85
86
87
+ if sys .version_info >= (3 , 11 ):
88
+ from typing import Self
89
+ else :
90
+ from typing_extensions import Self # pyright: reportUnusedImport = false
86
91
else :
87
92
npt : Any = None
93
+ Self : Any = None
88
94
89
95
HashableT = TypeVar ("HashableT" , bound = Hashable )
90
96
Original file line number Diff line number Diff line change 78
78
Level ,
79
79
MergeHow ,
80
80
NaPosition ,
81
+ NDFrameT ,
81
82
PythonFuncType ,
82
83
QuantileInterpolation ,
83
84
ReadBuffer ,
84
85
Renamer ,
85
86
Scalar ,
87
+ Self ,
86
88
SortKind ,
87
89
StorageOptions ,
88
90
Suffixes ,
@@ -4951,7 +4953,7 @@ def _reindex_multi(
4951
4953
@doc (NDFrame .align , ** _shared_doc_kwargs )
4952
4954
def align (
4953
4955
self ,
4954
- other : DataFrame ,
4956
+ other : NDFrameT ,
4955
4957
join : AlignJoin = "outer" ,
4956
4958
axis : Axis | None = None ,
4957
4959
level : Level = None ,
@@ -4961,7 +4963,7 @@ def align(
4961
4963
limit : int | None = None ,
4962
4964
fill_axis : Axis = 0 ,
4963
4965
broadcast_axis : Axis | None = None ,
4964
- ) -> DataFrame :
4966
+ ) -> tuple [ Self , NDFrameT ] :
4965
4967
return super ().align (
4966
4968
other ,
4967
4969
join = join ,
You can’t perform that action at this time.
0 commit comments