sizmailov / pybind11-stubgen

Generate stubs for python modules
Other
232 stars 47 forks source link

fixes #85 #95

Closed sherlockdoyle closed 1 year ago

sherlockdoyle commented 1 year ago

This PR adds changes to split docs for overloaded functions separately. Added tests for the same.

The idea is to parse the docstrings (which are below the signature) while parsing the function_signatures_from_docstring and set it in the FunctionSignature. Then, while generating the stubs, we can use the docstring from the FunctionSignature instead of the whole docstring.

sherlockdoyle commented 1 year ago

If the docstring of any function or method doesn't have the function signature, these changes could potentially create a problem. But since pybind11 docstrings already have the function signatures, we should be good to go.

sizmailov commented 1 year ago

Thanks for the contribution.

Superceeded by #112