-
Torsten Wörtwein authored
* TYP: update mypy and small pyi fixes from ruff * fix errors * use pyright ignore comment (would prefer 'as TypeGuard') * disable PLC0414 * Revert "disable PLC0414" This reverts commit c0f7b2bf132ed9b63ee3c7d7e92044b46c40ba76.
Unverified9ff33222
numba.pyi 1.19 KiB
# pyright: reportIncompleteStub = false
from typing import (
Any,
Callable,
Literal,
overload,
)
import numba
from pandas._typing import F
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