5454 ensure_object ,
5555 is_bool ,
5656 is_bool_dtype ,
57- is_extension_array_dtype ,
5857 is_float_dtype ,
5958 is_integer ,
6059 is_integer_dtype ,
@@ -1611,8 +1610,8 @@ def _validate(self, validate: str) -> None:
16111610
16121611
16131612def get_join_indexers (
1614- left_keys ,
1615- right_keys ,
1613+ left_keys : list [ AnyArrayLike ] ,
1614+ right_keys : list [ AnyArrayLike ] ,
16161615 sort : bool = False ,
16171616 how : MergeHow | Literal ["asof" ] = "inner" ,
16181617 ** kwargs ,
@@ -1621,8 +1620,8 @@ def get_join_indexers(
16211620
16221621 Parameters
16231622 ----------
1624- left_keys : ndarray, Index, Series
1625- right_keys : ndarray, Index, Series
1623+ left_keys : list[ ndarray, ExtensionArray, Index, Series]
1624+ right_keys : list[ ndarray, ExtensionArray, Index, Series]
16261625 sort : bool, default False
16271626 how : {'inner', 'outer', 'left', 'right'}, default 'inner'
16281627
@@ -2062,11 +2061,11 @@ def _get_merge_keys(
20622061 def _get_join_indexers (self ) -> tuple [npt .NDArray [np .intp ], npt .NDArray [np .intp ]]:
20632062 """return the join indexers"""
20642063
2065- def flip (xs ) -> np .ndarray :
2064+ def flip (xs : list [ AnyArrayLike ] ) -> np .ndarray :
20662065 """unlike np.transpose, this returns an array of tuples"""
20672066
2068- def injection (obj ):
2069- if not is_extension_array_dtype (obj ):
2067+ def injection (obj : AnyArrayLike ):
2068+ if not isinstance (obj . dtype , ExtensionDtype ):
20702069 # ndarray
20712070 return obj
20722071 obj = extract_array (obj )
@@ -2213,7 +2212,7 @@ def injection(obj):
22132212
22142213
22152214def _get_multiindex_indexer (
2216- join_keys , index : MultiIndex , sort : bool
2215+ join_keys : list [ AnyArrayLike ] , index : MultiIndex , sort : bool
22172216) -> tuple [npt .NDArray [np .intp ], npt .NDArray [np .intp ]]:
22182217 # left & right join labels and num. of levels at each location
22192218 mapped = (
@@ -2250,7 +2249,7 @@ def _get_multiindex_indexer(
22502249
22512250
22522251def _get_single_indexer (
2253- join_key , index : Index , sort : bool = False
2252+ join_key : AnyArrayLike , index : Index , sort : bool = False
22542253) -> tuple [npt .NDArray [np .intp ], npt .NDArray [np .intp ]]:
22552254 left_key , right_key , count = _factorize_keys (join_key , index ._values , sort = sort )
22562255
@@ -2295,7 +2294,7 @@ def _get_no_sort_one_missing_indexer(
22952294
22962295
22972296def _left_join_on_index (
2298- left_ax : Index , right_ax : Index , join_keys , sort : bool = False
2297+ left_ax : Index , right_ax : Index , join_keys : list [ AnyArrayLike ] , sort : bool = False
22992298) -> tuple [Index , npt .NDArray [np .intp ] | None , npt .NDArray [np .intp ]]:
23002299 if isinstance (right_ax , MultiIndex ):
23012300 left_indexer , right_indexer = _get_multiindex_indexer (
@@ -2316,8 +2315,8 @@ def _left_join_on_index(
23162315
23172316
23182317def _factorize_keys (
2319- lk : ArrayLike ,
2320- rk : ArrayLike ,
2318+ lk : AnyArrayLike ,
2319+ rk : AnyArrayLike ,
23212320 sort : bool = True ,
23222321 how : MergeHow | Literal ["asof" ] = "inner" ,
23232322) -> tuple [npt .NDArray [np .intp ], npt .NDArray [np .intp ], int ]:
@@ -2328,9 +2327,9 @@ def _factorize_keys(
23282327
23292328 Parameters
23302329 ----------
2331- lk : array-like
2330+ lk : ndarray, ExtensionArray, Index, or Series
23322331 Left key.
2333- rk : array-like
2332+ rk : ndarray, ExtensionArray, Index, or Series
23342333 Right key.
23352334 sort : bool, defaults to True
23362335 If True, the encoding is done such that the unique elements in the
0 commit comments