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
What version (or hash if on master) of pybind11 are you using?
2.6.2
Problem description
When adding a .def(__str__, ...) on an instance of py::enum_ the name method of the enum members turns from an attribute into a method (i.e. you need parentheses to call it). Seems to happen both with and without a py::prepend().
Also this creates warnings when generating documentation with sphinx, because the docstring for name will show all the overloads for __str__. Those will contain *args and **kwargs which will be considered unclosed emphasis and strong emphasis characters.
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.6.2
Problem description
When adding a
.def(__str__, ...)
on an instance of py::enum_ thename
method of the enum members turns from an attribute into a method (i.e. you need parentheses to call it). Seems to happen both with and without apy::prepend()
.Also this creates warnings when generating documentation with sphinx, because the docstring for
name
will show all the overloads for__str__
. Those will contain*args
and**kwargs
which will be considered unclosed emphasis and strong emphasis characters.Reproducible example code
Then in Python:
Is this a regression? Put the last known working version here if it is.
2.5
The text was updated successfully, but these errors were encountered: