-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pybind-v2.12 stubs (identical to pybind-v2.13)
- Loading branch information
Showing
30 changed files
with
961 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
tests/stubs/python-3.12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from __future__ import annotations | ||
|
||
from demo._bindings import ( | ||
aliases, | ||
classes, | ||
eigen, | ||
enum, | ||
flawed_bindings, | ||
functions, | ||
issues, | ||
methods, | ||
numpy, | ||
properties, | ||
stl, | ||
stl_bind, | ||
typing, | ||
values, | ||
) | ||
|
||
from . import _bindings, core, pure_python | ||
|
||
__all__ = [ | ||
"aliases", | ||
"classes", | ||
"core", | ||
"eigen", | ||
"enum", | ||
"flawed_bindings", | ||
"functions", | ||
"issues", | ||
"methods", | ||
"numpy", | ||
"properties", | ||
"pure_python", | ||
"stl", | ||
"stl_bind", | ||
"typing", | ||
"values", | ||
"version", | ||
] | ||
version: str = "0.0.0" |
35 changes: 35 additions & 0 deletions
35
...bs/python-3.12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from __future__ import annotations | ||
|
||
from . import ( | ||
aliases, | ||
classes, | ||
eigen, | ||
enum, | ||
flawed_bindings, | ||
functions, | ||
issues, | ||
methods, | ||
numpy, | ||
properties, | ||
stl, | ||
stl_bind, | ||
typing, | ||
values, | ||
) | ||
|
||
__all__ = [ | ||
"aliases", | ||
"classes", | ||
"eigen", | ||
"enum", | ||
"flawed_bindings", | ||
"functions", | ||
"issues", | ||
"methods", | ||
"numpy", | ||
"properties", | ||
"stl", | ||
"stl_bind", | ||
"typing", | ||
"values", | ||
] |
53 changes: 53 additions & 0 deletions
53
...n-3.12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
from __future__ import annotations | ||
|
||
import typing | ||
|
||
import numpy | ||
from numpy import random | ||
|
||
import demo._bindings.enum | ||
from demo._bindings.aliases.foreign_method_arg import Bar2 as foreign_type_alias | ||
from demo._bindings.aliases.foreign_return import get_foo as foreign_class_alias | ||
|
||
from . import ( | ||
foreign_arg, | ||
foreign_attr, | ||
foreign_class_member, | ||
foreign_method_arg, | ||
foreign_method_return, | ||
foreign_return, | ||
missing_self_arg, | ||
) | ||
|
||
__all__ = [ | ||
"Color", | ||
"Dummy", | ||
"foreign_arg", | ||
"foreign_attr", | ||
"foreign_class_alias", | ||
"foreign_class_member", | ||
"foreign_enum_default", | ||
"foreign_method_arg", | ||
"foreign_method_return", | ||
"foreign_return", | ||
"foreign_type_alias", | ||
"func", | ||
"local_func_alias", | ||
"local_type_alias", | ||
"missing_self_arg", | ||
"random", | ||
] | ||
|
||
class Color: | ||
pass | ||
|
||
class Dummy: | ||
linalg = numpy.linalg | ||
|
||
def foreign_enum_default( | ||
color: typing.Any = demo._bindings.enum.ConsoleForegroundColor.Blue, | ||
) -> None: ... | ||
def func(arg0: int) -> int: ... | ||
|
||
local_func_alias = func | ||
local_type_alias = Color |
7 changes: 7 additions & 0 deletions
7
....12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/foreign_arg.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from __future__ import annotations | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["set_foo"] | ||
|
||
def set_foo(arg0: demo._bindings.classes.Foo) -> int: ... |
6 changes: 6 additions & 0 deletions
6
...12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/foreign_attr.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from __future__ import annotations | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["value"] | ||
value: demo._bindings.classes.Foo # value = <demo._bindings.classes.Foo object> |
12 changes: 12 additions & 0 deletions
12
...d11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/foreign_class_member.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import annotations | ||
|
||
import typing | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["Bar1"] | ||
|
||
class Bar1: | ||
foo: typing.ClassVar[ | ||
demo._bindings.classes.Foo | ||
] # value = <demo._bindings.classes.Foo object> |
8 changes: 8 additions & 0 deletions
8
...ind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/foreign_method_arg.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from __future__ import annotations | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["Bar2"] | ||
|
||
class Bar2: | ||
def set_foo(self, arg0: demo._bindings.classes.Foo) -> int: ... |
9 changes: 9 additions & 0 deletions
9
...11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/foreign_method_return.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from __future__ import annotations | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["Bar3"] | ||
|
||
class Bar3: | ||
@staticmethod | ||
def get_foo() -> demo._bindings.classes.Foo: ... |
7 changes: 7 additions & 0 deletions
7
.../pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/foreign_return.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from __future__ import annotations | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["get_foo"] | ||
|
||
def get_foo() -> demo._bindings.classes.Foo: ... |
8 changes: 8 additions & 0 deletions
8
...ybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/aliases/missing_self_arg.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from __future__ import annotations | ||
|
||
import demo._bindings.classes | ||
|
||
__all__ = ["Bar4"] | ||
|
||
class Bar4: | ||
def set_foo(self: demo._bindings.classes.Foo) -> int: ... |
57 changes: 57 additions & 0 deletions
57
...ubs/python-3.12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/classes.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
from __future__ import annotations | ||
|
||
import typing | ||
|
||
__all__ = ["Base", "CppException", "Derived", "Foo", "Outer"] | ||
|
||
class Base: | ||
class Inner: | ||
pass | ||
name: str | ||
|
||
class CppException(Exception): | ||
pass | ||
|
||
class Derived(Base): | ||
count: int | ||
|
||
class Foo: | ||
class FooChild: | ||
def __init__(self) -> None: ... | ||
def g(self) -> None: ... | ||
|
||
def __init__(self) -> None: ... | ||
def f(self) -> None: ... | ||
|
||
class Outer: | ||
class Inner: | ||
class NestedEnum: | ||
""" | ||
Members: | ||
ONE | ||
TWO | ||
""" | ||
|
||
ONE: typing.ClassVar[Outer.Inner.NestedEnum] # value = <NestedEnum.ONE: 1> | ||
TWO: typing.ClassVar[Outer.Inner.NestedEnum] # value = <NestedEnum.TWO: 2> | ||
__members__: typing.ClassVar[ | ||
dict[str, Outer.Inner.NestedEnum] | ||
] # value = {'ONE': <NestedEnum.ONE: 1>, 'TWO': <NestedEnum.TWO: 2>} | ||
def __eq__(self, other: typing.Any) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __init__(self, value: int) -> None: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: typing.Any) -> bool: ... | ||
def __repr__(self) -> str: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
def __str__(self) -> str: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
value: Outer.Inner.NestedEnum | ||
inner: Outer.Inner |
100 changes: 100 additions & 0 deletions
100
...stubs/python-3.12/pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings/eigen.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
from __future__ import annotations | ||
|
||
import typing | ||
|
||
import numpy | ||
import pybind11_stubgen.typing_ext | ||
import scipy.sparse | ||
|
||
__all__ = [ | ||
"accept_matrix_int", | ||
"accept_vector_float64", | ||
"dense_matrix_c", | ||
"dense_matrix_r", | ||
"fixed_mutator_a", | ||
"fixed_mutator_c", | ||
"fixed_mutator_r", | ||
"four_col_matrix_r", | ||
"four_row_matrix_r", | ||
"get_matrix_int", | ||
"get_vector_float64", | ||
"sparse_matrix_c", | ||
"sparse_matrix_r", | ||
] | ||
|
||
def accept_matrix_int( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, numpy.int32, pybind11_stubgen.typing_ext.FixedSize(3, 3) | ||
] | ||
) -> None: ... | ||
def accept_vector_float64( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, numpy.float64, pybind11_stubgen.typing_ext.FixedSize(3, 1) | ||
] | ||
) -> None: ... | ||
def dense_matrix_c( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize("m", "n") | ||
] | ||
) -> typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize("m", "n") | ||
]: ... | ||
def dense_matrix_r( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize("m", "n") | ||
] | ||
) -> typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize("m", "n") | ||
]: ... | ||
def fixed_mutator_a( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, | ||
numpy.float32, | ||
pybind11_stubgen.typing_ext.FixedSize(5, 6), | ||
numpy.ndarray.flags.writeable, | ||
] | ||
) -> None: ... | ||
def fixed_mutator_c( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, | ||
numpy.float32, | ||
pybind11_stubgen.typing_ext.FixedSize(5, 6), | ||
numpy.ndarray.flags.writeable, | ||
numpy.ndarray.flags.f_contiguous, | ||
] | ||
) -> None: ... | ||
def fixed_mutator_r( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, | ||
numpy.float32, | ||
pybind11_stubgen.typing_ext.FixedSize(5, 6), | ||
numpy.ndarray.flags.writeable, | ||
numpy.ndarray.flags.c_contiguous, | ||
] | ||
) -> None: ... | ||
def four_col_matrix_r( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize("m", 4) | ||
] | ||
) -> typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize("m", 4) | ||
]: ... | ||
def four_row_matrix_r( | ||
arg0: typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize(4, "n") | ||
] | ||
) -> typing.Annotated[ | ||
numpy.ndarray, numpy.float32, pybind11_stubgen.typing_ext.DynamicSize(4, "n") | ||
]: ... | ||
def get_matrix_int() -> typing.Annotated[ | ||
numpy.ndarray, numpy.int32, pybind11_stubgen.typing_ext.FixedSize(3, 3) | ||
]: ... | ||
def get_vector_float64() -> typing.Annotated[ | ||
numpy.ndarray, numpy.float64, pybind11_stubgen.typing_ext.FixedSize(3, 1) | ||
]: ... | ||
def sparse_matrix_c( | ||
arg0: typing.Annotated[scipy.sparse.csc_matrix, numpy.float32] | ||
) -> typing.Annotated[scipy.sparse.csc_matrix, numpy.float32]: ... | ||
def sparse_matrix_r( | ||
arg0: typing.Annotated[scipy.sparse.csr_matrix, numpy.float32] | ||
) -> typing.Annotated[scipy.sparse.csr_matrix, numpy.float32]: ... |
Oops, something went wrong.