"""
This type stub file was generated by pyright.
"""

import numpy as np
from typing import Union
from pandas._libs import missing as libmissing
from pandas._typing import NpDtype, npt
from pandas.compat import pa_version_under1p01
from pandas.core.arrays.arrow import ArrowExtensionArray
from pandas.core.arrays.string_ import BaseStringArray, StringDtype
from pandas.core.strings.object_array import ObjectStringArrayMixin

if notpa_version_under1p01:
    ...
ArrowStringScalarOrNAT = Union[str, libmissing.NAType]
class ArrowStringArray(ArrowExtensionArray, BaseStringArray, ObjectStringArrayMixin):
    """
    Extension array for string data in a ``pyarrow.ChunkedArray``.

    .. versionadded:: 1.2.0

    .. warning::

       ArrowStringArray is considered experimental. The implementation and
       parts of the API may change without warning.

    Parameters
    ----------
    values : pyarrow.Array or pyarrow.ChunkedArray
        The array of data.

    Attributes
    ----------
    None

    Methods
    -------
    None

    See Also
    --------
    array
        The recommended function for creating a ArrowStringArray.
    Series.str
        The string methods are available on Series backed by
        a ArrowStringArray.

    Notes
    -----
    ArrowStringArray returns a BooleanArray for comparison methods.

    Examples
    --------
    >>> pd.array(['This is', 'some text', None, 'data.'], dtype="string[pyarrow]")
    <ArrowStringArray>
    ['This is', 'some text', <NA>, 'data.']
    Length: 4, dtype: string
    """
    _dtype: StringDtype
    def __init__(self, values) -> None:
        ...
    
    @property
    def dtype(self) -> StringDtype:
        """
        An instance of 'string[pyarrow]'.
        """
        ...
    
    def __array__(self, dtype: NpDtype | None = ...) -> np.ndarray:
        """Correctly construct numpy arrays when passed to `np.asarray()`."""
        ...
    
    def to_numpy(self, dtype: npt.DTypeLike | None = ..., copy: bool = ..., na_value=...) -> np.ndarray:
        """
        Convert to a NumPy ndarray.
        """
        ...
    
    def insert(self, loc: int, item) -> ArrowStringArray:
        ...
    
    def isin(self, values) -> npt.NDArray[np.bool_]:
        ...
    
    def astype(self, dtype, copy: bool = ...): # -> ArrayLike | Self@ArrowStringArray | BaseMaskedArray:
        ...
    
    _str_na_value = ...


