Skip to content

Commit e299ca4

Browse files
Add MaskType to other cases
1 parent b6ae6e8 commit e299ca4

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

pandas-stubs/core/indexes/base.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ from pandas._typing import (
4848
HashableT,
4949
Label,
5050
Level,
51+
MaskType,
5152
NaPosition,
5253
TimedeltaDtypeArg,
5354
TimestampDtypeArg,
@@ -373,7 +374,7 @@ class Index(IndexOpsMixin[S1]):
373374
| np_ndarray_anyint
374375
| Sequence[int]
375376
| Index
376-
| Series[bool]
377+
| MaskType
377378
| Sequence[bool]
378379
| np_ndarray_bool
379380
),

pandas-stubs/core/indexes/interval.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import pandas as pd
1313
from pandas import Index
1414
from pandas.core.indexes.extension import ExtensionIndex
1515
from pandas.core.series import (
16-
Series,
1716
TimedeltaSeries,
1817
TimestampSeries,
1918
)
@@ -31,6 +30,7 @@ from pandas._typing import (
3130
IntervalClosedType,
3231
IntervalT,
3332
Label,
33+
MaskType,
3434
np_ndarray_anyint,
3535
np_ndarray_bool,
3636
npt,
@@ -254,7 +254,7 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin):
254254
| np_ndarray_anyint
255255
| Sequence[int]
256256
| Index
257-
| Series[bool]
257+
| MaskType
258258
| np_ndarray_bool
259259
),
260260
) -> IntervalIndex[IntervalT]: ...

pandas-stubs/core/indexes/multi.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ from pandas._typing import (
1818
Dtype,
1919
DtypeArg,
2020
HashableT,
21+
MaskType,
2122
np_ndarray_anyint,
2223
np_ndarray_bool,
2324
)
@@ -119,7 +120,7 @@ class MultiIndex(Index[Any]):
119120
| np_ndarray_anyint
120121
| Sequence[int]
121122
| Index
122-
| pd.Series[bool]
123+
| MaskType
123124
| Sequence[bool]
124125
| np_ndarray_bool
125126
),

pandas-stubs/core/indexes/range.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ from collections.abc import Sequence
22
from typing import overload
33

44
import numpy as np
5-
from pandas import Series
65
from pandas.core.indexes.base import Index
76

87
from pandas._typing import (
98
HashableT,
9+
MaskType,
1010
np_ndarray_anyint,
1111
np_ndarray_bool,
1212
npt,
@@ -78,7 +78,7 @@ class RangeIndex(Index[int]):
7878
| np_ndarray_anyint
7979
| Sequence[int]
8080
| Index
81-
| Series[bool]
81+
| MaskType
8282
| Sequence[bool]
8383
| np_ndarray_bool
8484
),

pandas-stubs/core/series.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
14331433
Series[S1]
14341434
| Series[_bool]
14351435
| np.ndarray
1436-
| Callable[[Series[S1]], Series[bool]]
1436+
| Callable[[Series[S1]], MaskType]
14371437
| Callable[[S1], bool]
14381438
),
14391439
other=...,
@@ -1448,7 +1448,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
14481448
Series[S1]
14491449
| Series[_bool]
14501450
| np.ndarray
1451-
| Callable[[Series[S1]], Series[bool]]
1451+
| Callable[[Series[S1]], MaskType]
14521452
| Callable[[S1], bool]
14531453
),
14541454
other: Scalar | Series[S1] | DataFrame | Callable | NAType | None = ...,
@@ -1462,7 +1462,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
14621462
caselist: list[
14631463
tuple[
14641464
Sequence[bool]
1465-
| Series[bool]
1465+
| MaskType
14661466
| Callable[[Series], Series | np.ndarray | Sequence[bool]],
14671467
ListLikeU | Scalar | Callable[[Series], Series | np.ndarray],
14681468
],

0 commit comments

Comments
 (0)