Skip to content

Commit d978b4e

Browse files
committed
misc.special type stubs
1 parent faf66df commit d978b4e

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

‎maint/stubtest/allowlist.txt‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ numba\.core\.utils\..*
2424
numba\.cpython\..*
2525
numba\.cuda\..*
2626
numba\.experimental\..*
27-
numba\.misc\..*
27+
numba\.misc\.POST
28+
numba\.misc\.appdirs\..*
29+
numba\.misc\.coverage_support\..*
30+
numba\.misc\.dump_style.*
31+
numba\.misc\.gdb_print_extension
32+
numba\.misc\.help\..*
33+
numba\.misc\.numba_entry
34+
numba\.misc\.numba_gdbinfo
35+
numba\.misc\.numba_sysinfo
36+
numba\.misc\.timsort
2837
numba\.mviewbuf
2938
numba\.np\.(arraymath|arrayobj|linalg|npyimpl|random|types|ufunc_db|unsafe)\..*
3039
numba\.np\.extensions

‎numba/misc/special.pyi‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from builtins import range as prange
2+
from typing import TypeVar
3+
4+
from _typeshed import Incomplete
5+
from numpy import ndindex as pndindex
6+
7+
from numba.core.typing.asnumbatype import as_numba_type
8+
from numba.core.typing.typeof import typeof
9+
10+
__all__ = [
11+
"typeof",
12+
"as_numba_type",
13+
"prange",
14+
"pndindex",
15+
"gdb",
16+
"gdb_breakpoint",
17+
"gdb_init",
18+
"literally",
19+
"literal_unroll",
20+
]
21+
22+
###
23+
24+
_T = TypeVar("_T")
25+
26+
###
27+
28+
def gdb(*args: Incomplete) -> None: ...
29+
def gdb_breakpoint() -> None: ...
30+
def gdb_init(*args: Incomplete) -> None: ...
31+
32+
#
33+
def literally(obj: _T) -> _T: ...
34+
def literal_unroll(container: _T) -> _T: ...

0 commit comments

Comments
 (0)