#include <pybind11/pybind11.h>
struct s {
};
PYBIND11_MODULE(demo, m) {
pybind11::class_<s>(m, "s")
.def(pybind11::init<>())
.def_property_readonly_static("a", []() { return 1; });
}
traceback:
Traceback (most recent call last):
File "...\pybind11_stubgen\__init__.py", line 1143, in main
_module.parse()
File "...\pybind11_stubgen\__init__.py", line 913, in parse
x.parse()
File "...\pybind11_stubgen\__init__.py", line 720, in parse
for name, member in inspect.getmembers(self.klass):
File ...\Python311\Lib\inspect.py", line 469, in getmembers
value = getattr(object, key)
TypeError: (): incompatible function arguments. The following argument types are supported:
1. () -> int
Invoked with: <class 'demo.s'>
reoroduce cpp module
traceback: