forked from pybind/pybind11-stubgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.pyi
More file actions
60 lines (54 loc) · 1.79 KB
/
functions.pyi
File metadata and controls
60 lines (54 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from __future__ import annotations
import typing
__all__: list[str] = [
"Foo",
"accept_annotated_callable",
"accept_callable",
"accept_frozenset",
"accept_py_handle",
"accept_py_object",
"accept_set",
"add",
"default_custom_arg",
"default_int_arg",
"default_list_arg",
"default_optional_arg",
"func_w_anon_args",
"func_w_named_pos_args",
"generic",
"mul",
"nested_types",
"pass_callback",
"pos_kw_only_mix",
"pos_kw_only_variadic_mix",
]
class Foo:
def __init__(self, arg0: int) -> None: ...
def accept_annotated_callable(arg0: typing.Callable[[int, int], int]) -> typing.Any: ...
def accept_callable(arg0: typing.Callable) -> typing.Any: ...
def accept_frozenset(arg0: frozenset) -> None: ...
def accept_py_handle(arg0: typing.Any) -> str: ...
def accept_py_object(arg0: typing.Any) -> str: ...
def accept_set(arg0: set) -> None: ...
def add(arg0: int, arg1: int) -> int: ...
def default_custom_arg(foo: Foo = Foo(5)) -> None: ...
def default_int_arg(n: int = 5) -> None: ...
def default_list_arg(l: list = [1, 2, 6, 18]) -> None: ...
def default_optional_arg(n: int | None = None) -> None: ...
def func_w_anon_args(arg0: int, arg1: int, arg2: int) -> None: ...
def func_w_named_pos_args(x: int, y: int, z: int) -> None: ...
def generic(*args, **kwargs) -> None: ...
@typing.overload
def mul(x: int, y: int) -> int:
"""
Multiply x and y (int)
"""
@typing.overload
def mul(p: float, q: float) -> float:
"""
Multiply p and q (double)
"""
def nested_types(arg0: list[Foo] | Foo) -> list[Foo] | Foo: ...
def pass_callback(arg0: typing.Callable[[Foo], Foo]) -> Foo: ...
def pos_kw_only_mix(i: int, /, j: int, *, k: int) -> tuple: ...
def pos_kw_only_variadic_mix(i: int, /, j: int, *args, k: int, **kwargs) -> tuple: ...