Skip to content

Commit

Permalink
Add MaskType to other cases
Browse files Browse the repository at this point in the history
  • Loading branch information
loicdiridollou committed Dec 13, 2024
1 parent b6ae6e8 commit e299ca4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pandas-stubs/core/indexes/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ from pandas._typing import (
HashableT,
Label,
Level,
MaskType,
NaPosition,
TimedeltaDtypeArg,
TimestampDtypeArg,
Expand Down Expand Up @@ -373,7 +374,7 @@ class Index(IndexOpsMixin[S1]):
| np_ndarray_anyint
| Sequence[int]
| Index
| Series[bool]
| MaskType
| Sequence[bool]
| np_ndarray_bool
),
Expand Down
4 changes: 2 additions & 2 deletions pandas-stubs/core/indexes/interval.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import pandas as pd
from pandas import Index
from pandas.core.indexes.extension import ExtensionIndex
from pandas.core.series import (
Series,
TimedeltaSeries,
TimestampSeries,
)
Expand All @@ -31,6 +30,7 @@ from pandas._typing import (
IntervalClosedType,
IntervalT,
Label,
MaskType,
np_ndarray_anyint,
np_ndarray_bool,
npt,
Expand Down Expand Up @@ -254,7 +254,7 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin):
| np_ndarray_anyint
| Sequence[int]
| Index
| Series[bool]
| MaskType
| np_ndarray_bool
),
) -> IntervalIndex[IntervalT]: ...
Expand Down
3 changes: 2 additions & 1 deletion pandas-stubs/core/indexes/multi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ from pandas._typing import (
Dtype,
DtypeArg,
HashableT,
MaskType,
np_ndarray_anyint,
np_ndarray_bool,
)
Expand Down Expand Up @@ -119,7 +120,7 @@ class MultiIndex(Index[Any]):
| np_ndarray_anyint
| Sequence[int]
| Index
| pd.Series[bool]
| MaskType
| Sequence[bool]
| np_ndarray_bool
),
Expand Down
4 changes: 2 additions & 2 deletions pandas-stubs/core/indexes/range.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ from collections.abc import Sequence
from typing import overload

import numpy as np
from pandas import Series
from pandas.core.indexes.base import Index

from pandas._typing import (
HashableT,
MaskType,
np_ndarray_anyint,
np_ndarray_bool,
npt,
Expand Down Expand Up @@ -78,7 +78,7 @@ class RangeIndex(Index[int]):
| np_ndarray_anyint
| Sequence[int]
| Index
| Series[bool]
| MaskType
| Sequence[bool]
| np_ndarray_bool
),
Expand Down
6 changes: 3 additions & 3 deletions pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
Series[S1]
| Series[_bool]
| np.ndarray
| Callable[[Series[S1]], Series[bool]]
| Callable[[Series[S1]], MaskType]
| Callable[[S1], bool]
),
other=...,
Expand All @@ -1448,7 +1448,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
Series[S1]
| Series[_bool]
| np.ndarray
| Callable[[Series[S1]], Series[bool]]
| Callable[[Series[S1]], MaskType]
| Callable[[S1], bool]
),
other: Scalar | Series[S1] | DataFrame | Callable | NAType | None = ...,
Expand All @@ -1462,7 +1462,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
caselist: list[
tuple[
Sequence[bool]
| Series[bool]
| MaskType
| Callable[[Series], Series | np.ndarray | Sequence[bool]],
ListLikeU | Scalar | Callable[[Series], Series | np.ndarray],
],
Expand Down

0 comments on commit e299ca4

Please sign in to comment.