Skip to content

Commit 6bb7ab1

Browse files
committed
fix: missed test files
1 parent 5251cef commit 6bb7ab1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1894
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
from __future__ import annotations
2+
3+
from demo._bindings import (
4+
aliases,
5+
classes,
6+
eigen,
7+
enum,
8+
flawed_bindings,
9+
functions,
10+
issues,
11+
methods,
12+
numpy,
13+
properties,
14+
stl,
15+
stl_bind,
16+
typing,
17+
values,
18+
)
19+
20+
from . import _bindings, core, pure_python
21+
22+
__all__ = [
23+
"aliases",
24+
"classes",
25+
"core",
26+
"eigen",
27+
"enum",
28+
"flawed_bindings",
29+
"functions",
30+
"issues",
31+
"methods",
32+
"numpy",
33+
"properties",
34+
"pure_python",
35+
"stl",
36+
"stl_bind",
37+
"typing",
38+
"values",
39+
"version",
40+
]
41+
version: str = "0.0.0"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from __future__ import annotations
2+
3+
from . import (
4+
aliases,
5+
classes,
6+
eigen,
7+
enum,
8+
flawed_bindings,
9+
functions,
10+
issues,
11+
methods,
12+
numpy,
13+
properties,
14+
stl,
15+
stl_bind,
16+
typing,
17+
values,
18+
)
19+
20+
__all__ = [
21+
"aliases",
22+
"classes",
23+
"eigen",
24+
"enum",
25+
"flawed_bindings",
26+
"functions",
27+
"issues",
28+
"methods",
29+
"numpy",
30+
"properties",
31+
"stl",
32+
"stl_bind",
33+
"typing",
34+
"values",
35+
]
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
from __future__ import annotations
2+
3+
import typing
4+
5+
import numpy
6+
from numpy import random
7+
8+
import demo._bindings.enum
9+
from demo._bindings.aliases.foreign_method_arg import Bar2 as foreign_type_alias
10+
from demo._bindings.aliases.foreign_return import get_foo as foreign_class_alias
11+
12+
from . import (
13+
foreign_arg,
14+
foreign_attr,
15+
foreign_class_member,
16+
foreign_method_arg,
17+
foreign_method_return,
18+
foreign_return,
19+
missing_self_arg,
20+
)
21+
22+
__all__ = [
23+
"Color",
24+
"Dummy",
25+
"foreign_arg",
26+
"foreign_attr",
27+
"foreign_class_alias",
28+
"foreign_class_member",
29+
"foreign_enum_default",
30+
"foreign_method_arg",
31+
"foreign_method_return",
32+
"foreign_return",
33+
"foreign_type_alias",
34+
"func",
35+
"local_func_alias",
36+
"local_type_alias",
37+
"missing_self_arg",
38+
"random",
39+
]
40+
41+
class Color:
42+
pass
43+
44+
class Dummy:
45+
linalg = numpy.linalg
46+
47+
def foreign_enum_default(
48+
color: typing.Any = demo._bindings.enum.ConsoleForegroundColor.Blue,
49+
) -> None: ...
50+
def func(arg0: int) -> int: ...
51+
52+
local_func_alias = func
53+
local_type_alias = Color
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from __future__ import annotations
2+
3+
import demo._bindings.classes
4+
5+
__all__ = ["set_foo"]
6+
7+
def set_foo(arg0: demo._bindings.classes.Foo) -> int: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from __future__ import annotations
2+
3+
import demo._bindings.classes
4+
5+
__all__ = ["value"]
6+
value: demo._bindings.classes.Foo # value = <demo._bindings.classes.Foo object>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from __future__ import annotations
2+
3+
import typing
4+
5+
import demo._bindings.classes
6+
7+
__all__ = ["Bar1"]
8+
9+
class Bar1:
10+
foo: typing.ClassVar[
11+
demo._bindings.classes.Foo
12+
] # value = <demo._bindings.classes.Foo object>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from __future__ import annotations
2+
3+
import demo._bindings.classes
4+
5+
__all__ = ["Bar2"]
6+
7+
class Bar2:
8+
def set_foo(self, arg0: demo._bindings.classes.Foo) -> int: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from __future__ import annotations
2+
3+
import demo._bindings.classes
4+
5+
__all__ = ["Bar3"]
6+
7+
class Bar3:
8+
@staticmethod
9+
def get_foo() -> demo._bindings.classes.Foo: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from __future__ import annotations
2+
3+
import demo._bindings.classes
4+
5+
__all__ = ["get_foo"]
6+
7+
def get_foo() -> demo._bindings.classes.Foo: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from __future__ import annotations
2+
3+
import demo._bindings.classes
4+
5+
__all__ = ["Bar4"]
6+
7+
class Bar4:
8+
def set_foo(self: demo._bindings.classes.Foo) -> int: ...
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
from __future__ import annotations
2+
3+
import typing
4+
5+
__all__ = ["Base", "CppException", "Derived", "Foo", "Outer"]
6+
7+
class Base:
8+
class Inner:
9+
pass
10+
name: str
11+
12+
class CppException(Exception):
13+
pass
14+
15+
class Derived(Base):
16+
count: int
17+
18+
class Foo:
19+
class FooChild:
20+
def __init__(self) -> None: ...
21+
def g(self) -> None: ...
22+
23+
def __init__(self) -> None: ...
24+
def f(self) -> None: ...
25+
26+
class Outer:
27+
class Inner:
28+
class NestedEnum:
29+
"""
30+
Members:
31+
32+
ONE
33+
34+
TWO
35+
"""
36+
37+
ONE: typing.ClassVar[Outer.Inner.NestedEnum] # value = <NestedEnum.ONE: 1>
38+
TWO: typing.ClassVar[Outer.Inner.NestedEnum] # value = <NestedEnum.TWO: 2>
39+
__members__: typing.ClassVar[
40+
dict[str, Outer.Inner.NestedEnum]
41+
] # value = {'ONE': <NestedEnum.ONE: 1>, 'TWO': <NestedEnum.TWO: 2>}
42+
def __eq__(self, other: typing.Any) -> bool: ...
43+
def __getstate__(self) -> int: ...
44+
def __hash__(self) -> int: ...
45+
def __index__(self) -> int: ...
46+
def __init__(self, value: int) -> None: ...
47+
def __int__(self) -> int: ...
48+
def __ne__(self, other: typing.Any) -> bool: ...
49+
def __repr__(self) -> str: ...
50+
def __setstate__(self, state: int) -> None: ...
51+
def __str__(self) -> str: ...
52+
@property
53+
def name(self) -> str: ...
54+
@property
55+
def value(self) -> int: ...
56+
value: Outer.Inner.NestedEnum
57+
inner: Outer.Inner
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
from __future__ import annotations
2+
3+
import typing
4+
5+
import numpy
6+
import scipy.sparse
7+
8+
__all__ = [
9+
"accept_matrix_int",
10+
"accept_vector_float64",
11+
"dense_matrix_c",
12+
"dense_matrix_r",
13+
"fixed_mutator_a",
14+
"fixed_mutator_c",
15+
"fixed_mutator_r",
16+
"four_col_matrix_r",
17+
"four_row_matrix_r",
18+
"get_matrix_int",
19+
"get_vector_float64",
20+
"sparse_matrix_c",
21+
"sparse_matrix_r",
22+
]
23+
M = typing.TypeVar("M", bound=int)
24+
N = typing.TypeVar("N", bound=int)
25+
26+
def accept_matrix_int(
27+
arg0: numpy.ndarray[
28+
tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.int32]
29+
]
30+
) -> None: ...
31+
def accept_vector_float64(
32+
arg0: numpy.ndarray[
33+
tuple[typing.Literal[3], typing.Literal[1]], numpy.dtype[numpy.float64]
34+
]
35+
) -> None: ...
36+
def dense_matrix_c(
37+
arg0: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float32]]
38+
) -> numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float32]]: ...
39+
def dense_matrix_r(
40+
arg0: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float32]]
41+
) -> numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float32]]: ...
42+
def fixed_mutator_a(
43+
arg0: numpy.ndarray[
44+
tuple[typing.Literal[5], typing.Literal[6]], numpy.dtype[numpy.float32]
45+
]
46+
) -> None: ...
47+
def fixed_mutator_c(
48+
arg0: numpy.ndarray[
49+
tuple[typing.Literal[5], typing.Literal[6]], numpy.dtype[numpy.float32]
50+
]
51+
) -> None: ...
52+
def fixed_mutator_r(
53+
arg0: numpy.ndarray[
54+
tuple[typing.Literal[5], typing.Literal[6]], numpy.dtype[numpy.float32]
55+
]
56+
) -> None: ...
57+
def four_col_matrix_r(
58+
arg0: numpy.ndarray[tuple[M, typing.Literal[4]], numpy.dtype[numpy.float32]]
59+
) -> numpy.ndarray[tuple[M, typing.Literal[4]], numpy.dtype[numpy.float32]]: ...
60+
def four_row_matrix_r(
61+
arg0: numpy.ndarray[tuple[typing.Literal[4], N], numpy.dtype[numpy.float32]]
62+
) -> numpy.ndarray[tuple[typing.Literal[4], N], numpy.dtype[numpy.float32]]: ...
63+
def get_matrix_int() -> numpy.ndarray[
64+
tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.int32]
65+
]: ...
66+
def get_vector_float64() -> numpy.ndarray[
67+
tuple[typing.Literal[3], typing.Literal[1]], numpy.dtype[numpy.float64]
68+
]: ...
69+
def sparse_matrix_c(arg0: scipy.sparse.csc_matrix) -> scipy.sparse.csc_matrix: ...
70+
def sparse_matrix_r(arg0: scipy.sparse.csr_matrix) -> scipy.sparse.csr_matrix: ...
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
from __future__ import annotations
2+
3+
import typing
4+
5+
__all__ = [
6+
"Blue",
7+
"ConsoleForegroundColor",
8+
"Green",
9+
"Magenta",
10+
"None_",
11+
"Yellow",
12+
"accept_defaulted_enum",
13+
]
14+
15+
class ConsoleForegroundColor:
16+
"""
17+
Members:
18+
19+
Green
20+
21+
Yellow
22+
23+
Blue
24+
25+
Magenta
26+
27+
None_
28+
"""
29+
30+
Blue: typing.ClassVar[
31+
ConsoleForegroundColor
32+
] # value = <ConsoleForegroundColor.Blue: 34>
33+
Green: typing.ClassVar[
34+
ConsoleForegroundColor
35+
] # value = <ConsoleForegroundColor.Green: 32>
36+
Magenta: typing.ClassVar[
37+
ConsoleForegroundColor
38+
] # value = <ConsoleForegroundColor.Magenta: 35>
39+
None_: typing.ClassVar[
40+
ConsoleForegroundColor
41+
] # value = <ConsoleForegroundColor.None_: -1>
42+
Yellow: typing.ClassVar[
43+
ConsoleForegroundColor
44+
] # value = <ConsoleForegroundColor.Yellow: 33>
45+
__members__: typing.ClassVar[
46+
dict[str, ConsoleForegroundColor]
47+
] # value = {'Green': <ConsoleForegroundColor.Green: 32>, 'Yellow': <ConsoleForegroundColor.Yellow: 33>, 'Blue': <ConsoleForegroundColor.Blue: 34>, 'Magenta': <ConsoleForegroundColor.Magenta: 35>, 'None_': <ConsoleForegroundColor.None_: -1>}
48+
def __eq__(self, other: typing.Any) -> bool: ...
49+
def __getstate__(self) -> int: ...
50+
def __hash__(self) -> int: ...
51+
def __index__(self) -> int: ...
52+
def __init__(self, value: int) -> None: ...
53+
def __int__(self) -> int: ...
54+
def __ne__(self, other: typing.Any) -> bool: ...
55+
def __repr__(self) -> str: ...
56+
def __setstate__(self, state: int) -> None: ...
57+
def __str__(self) -> str: ...
58+
@property
59+
def name(self) -> str: ...
60+
@property
61+
def value(self) -> int: ...
62+
63+
def accept_defaulted_enum(
64+
color: ConsoleForegroundColor = ConsoleForegroundColor.None_,
65+
) -> None: ...
66+
67+
Blue: ConsoleForegroundColor # value = <ConsoleForegroundColor.Blue: 34>
68+
Green: ConsoleForegroundColor # value = <ConsoleForegroundColor.Green: 32>
69+
Magenta: ConsoleForegroundColor # value = <ConsoleForegroundColor.Magenta: 35>
70+
None_: ConsoleForegroundColor # value = <ConsoleForegroundColor.None_: -1>
71+
Yellow: ConsoleForegroundColor # value = <ConsoleForegroundColor.Yellow: 33>

0 commit comments

Comments
 (0)