# mypy: disable-error-code="name-defined"
from types import ModuleType
from typing import Any, Iterable, TypeGuard

import pandas as pd

from numpy import dtype
from pandas.core.dtypes.base import ExtensionDtype

class _PandasAPIShim:
    has_sparse: bool

    def series(self, *args, **kwargs) -> pd.Series: ...
    def data_frame(self, *args, **kwargs) -> pd.DataFrame: ...
    @property
    def have_pandas(self) -> bool: ...
    @property
    def compat(self) -> ModuleType: ...
    @property
    def pd(self) -> ModuleType: ...
    def infer_dtype(self, obj: Iterable) -> str: ...
    def pandas_dtype(self, dtype: str) -> dtype: ...
    @property
    def loose_version(self) -> Any: ...
    @property
    def version(self) -> str: ...
    def is_v1(self) -> bool: ...
    def is_ge_v21(self) -> bool: ...
    def is_ge_v3(self) -> bool: ...
    @property
    def categorical_type(self) -> type[pd.Categorical]: ...
    @property
    def datetimetz_type(self) -> type[pd.DatetimeTZDtype]: ...
    @property
    def extension_dtype(self) -> type[ExtensionDtype]: ...
    def is_array_like(
        self, obj: Any
    ) -> TypeGuard[pd.Series | pd.Index | pd.Categorical | ExtensionDtype]: ...
    def is_categorical(self, obj: Any) -> TypeGuard[pd.Categorical]: ...
    def is_datetimetz(self, obj: Any) -> TypeGuard[pd.DatetimeTZDtype]: ...
    def is_extension_array_dtype(self, obj: Any) -> TypeGuard[ExtensionDtype]: ...
    def is_sparse(self, obj: Any) -> bool: ...
    def is_data_frame(self, obj: Any) -> TypeGuard[pd.DataFrame]: ...
    def is_series(self, obj: Any) -> TypeGuard[pd.Series]: ...
    def is_index(self, obj: Any) -> TypeGuard[pd.Index]: ...
    def get_values(self, obj: Any) -> bool: ...
    def get_rangeindex_attribute(self, level, name): ...

_pandas_api: _PandasAPIShim

__all__ = ["_PandasAPIShim", "_pandas_api"]
