"""Numba stubs.
Copied from pandas.
"""

# pyright: reportIncompleteStub = false
from typing import TYPE_CHECKING, Any, Callable, Literal, TypeVar, overload

if TYPE_CHECKING:
    import numba

FuncType = Callable[..., Any]
F = TypeVar("F", bound=FuncType)


def __getattr__(name: str) -> Any: ...  # incomplete
@overload
def jit(signature_or_function: F) -> F: ...
@overload
def jit(
    signature_or_function: str
    | list[str]
    | numba.core.types.abstract.Type
    | list[numba.core.types.abstract.Type] = ...,
    locals: dict = ...,  # TODO: Mapping of local variable names to Numba types
    cache: bool = ...,
    pipeline_class: numba.compiler.CompilerBase = ...,
    boundscheck: bool | None = ...,
    *,
    nopython: bool = ...,
    forceobj: bool = ...,
    looplift: bool = ...,
    error_model: Literal["python", "numpy"] = ...,
    inline: Literal["never", "always"] | Callable = ...,
    # TODO: If a callable is provided it will be called with the call expression
    # node that is requesting inlining, the caller's IR and callee's IR as
    # arguments, it is expected to return Truthy as to whether to inline.
    target: Literal["cpu", "gpu", "npyufunc", "cuda"] = ...,  # deprecated
    nogil: bool = ...,
    parallel: bool = ...,
) -> Callable[[F], F]: ...

njit = jit
generated_jit = jit
