enhancementhelp wanted
Repository metrics
- Stars
- (14,677 stars)
- PR merge metrics
- (平均マージ 5d 2h) (30d で 10 merged PRs)
説明
I try to rely on mypy's stubgen (with recent improvements) to generate *.pyi files from Python classes generated by pybind11. It's almost perfect, though there are just a few things that needs a bit of polishing:
iterator- when creating method with.def("some_func", [](some_type const &a) {return py::make_iterator(a.cbegin<elem_type>(), a.cend<elem_type>());};then docstring issome_func() -> iterator. Type should be either Iterator (from typing) or even better, if it would beIterator[elem_type]buffer- when binding method with signatureadd_buffer(py::buffer const &buf)the docstring isadd_buffer(buffer: buffer). Is thisbufferin Python2 andbytearrayin Python3? Should stubgen alias bytearray as buffer in such cases?