You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the original docstring __init__(self: sandbox.Sequence, x: int) contains the fully qualified class name, which would in theory allow more fine-grained differentiation between custom classes and classes from the standard library:
$ python -c "import sandbox; print(help(sandbox.Sequence))"
Help on class Sequence in module sandbox:
class Sequence(pybind11_builtins.pybind11_object)
| Method resolution order:
| Sequence
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(...)
| __init__(self: sandbox.Sequence, x: int) -> None
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) class method of pybind11_builtins.pybind11_object
| Create and return a new object. See help(type) for accurate signature.
The text was updated successfully, but these errors were encountered:
Defining a custom pybind11 class that is named
Sequence
,Union
, or other classes from thetyping
package leads to incorrectly generated signatures:pybind11-stubgen incorrectly annotated the CTOR as
self: typing.Sequence, x: int
instead ofself, x: int
or at leastself: Sequence, x: int
Note that the original docstring
__init__(self: sandbox.Sequence, x: int)
contains the fully qualified class name, which would in theory allow more fine-grained differentiation between custom classes and classes from the standard library:The text was updated successfully, but these errors were encountered: