Skip to content

Commit 6439619

Browse files
Apply suggestions from code review
Co-authored-by: Yi-Fan Wang <cmp0xff@users.noreply.github.com>
1 parent a90ea69 commit 6439619

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas-stubs/core/indexes/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
526526
@final
527527
def asof(self, label: Scalar) -> Scalar: ...
528528
def asof_locs(
529-
self, where: DatetimeIndex, mask: npt.NDArray[np.bool_]
529+
self, where: DatetimeIndex, mask: np_ndarray_bool
530530
) -> np_1darray_intp: ...
531531
@overload
532532
def sort_values(

tests/indexes/test_indexes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,9 +1612,9 @@ def test_index_asof_locs() -> None:
16121612
def test_index_sort_values() -> None:
16131613
idx = pd.DatetimeIndex(["2020-01-01", "2020-01-02", "2020-01-03"])
16141614
check(assert_type(idx.sort_values(), pd.DatetimeIndex), pd.DatetimeIndex)
1615-
sorted_ = idx.sort_values(return_indexer=True)
1616-
check(assert_type(sorted_[0], pd.DatetimeIndex), pd.DatetimeIndex)
1617-
check(assert_type(sorted_[1], np_1darray_intp), np_1darray_intp)
1615+
sorted_index, indexer = idx.sort_values(return_indexer=True)
1616+
check(assert_type(sorted_index, pd.DatetimeIndex), pd.DatetimeIndex)
1617+
check(assert_type(indexer, np_1darray_intp), np_1darray_intp)
16181618

16191619

16201620
def test_index_get_indexer_non_unique() -> None:

0 commit comments

Comments
 (0)