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
The new native_enum added to pybind11 is not supported by pybind11-stubgen. Function signatures don't seem to map the enum type from the pybind11 docstring. I am not sure if this should be fixed in pybind11 or if this is something the stubgen tool should handle.
As an example I have an enum, with following generated stubs
classeProjectionMethod(enum.IntEnum):
kConformal: typing.ClassVar[eProjectionMethod] # value = <eProjectionMethod.kConformal: 1>kRayCast: typing.ClassVar[eProjectionMethod] # value = <eProjectionMethod.kRayCast: 2>kSymmetricDirichlet: typing.ClassVar[eProjectionMethod] # value = <eProjectionMethod.kSymmetricDirichlet: 0>@classmethoddef__new__(cls, value):
...
def__format__(self, format_spec):
The function using this enum is SurfaceProjection, e.g. this is what help(xcm.SurfaceProjection) prints:
Uh oh!
There was an error while loading. Please reload this page.
The new
native_enum
added to pybind11 is not supported by pybind11-stubgen. Function signatures don't seem to map the enum type from the pybind11 docstring. I am not sure if this should be fixed in pybind11 or if this is something the stubgen tool should handle.As an example I have an enum, with following generated stubs
The function using this enum is
SurfaceProjection
, e.g. this is what help(xcm.SurfaceProjection) prints:But the stubs generated by
pybind11-stubgen
is:Note, neither the type nor the default value of
method
is shown and I see the error messageSince I would like to fix the issue I would also be willing to submit a PR (to pybind11-stubgen or pybind11 if more appropriate).
The text was updated successfully, but these errors were encountered: