import numpy as np
from .masked import BaseMaskedArray as BaseMaskedArray
from pandas._typing import Scalar as Scalar
from pandas.core import nanops as nanops, ops as ops
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
from pandas.core.dtypes.cast import astype_nansafe as astype_nansafe

from pandas.core.dtypes.dtypes import register_extension_dtype as register_extension_dtype
from pandas.core.dtypes.generic import ABCDataFrame as ABCDataFrame, ABCIndexClass as ABCIndexClass, ABCSeries as ABCSeries
from pandas.core.dtypes.missing import isna as isna, notna as notna

from typing import Any, Type

class BooleanDtype(ExtensionDtype):
    name: str = ...
    @property
    def na_value(self) -> Scalar: ...
    @property
    def type(self) -> Type[Any]: ...
    @property
    def kind(self) -> str: ...
    @classmethod
    def construct_array_type(cls: Any) -> Type[BooleanArray]: ...
    def __from_arrow__(self, array: Any) -> Any: ...

def coerce_to_array(values: Any, mask: Any = ..., copy: bool=...) -> Any: ...

class BooleanArray(BaseMaskedArray):
    def __init__(self, values: np.ndarray, mask: np.ndarray, copy: bool=...) -> None: ...
    @property
    def dtype(self) -> Any: ...
    def __array_ufunc__(self, ufunc: Any, method: Any, *inputs: Any, **kwargs: Any) -> Any: ...
    def __setitem__(self, key: Any, value: Any) -> None: ...
    def astype(self, dtype: Any, copy: bool = ...) -> Any: ...
    def any(self, skipna: bool=..., **kwargs: Any) -> Any: ...
    def all(self, skipna: bool=..., **kwargs: Any) -> Any: ...
