sizmailov / pybind11-stubgen

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

Missing support for py::sequence types #105

Closed SimonHeim closed 1 year ago

SimonHeim commented 1 year ago

My Pybind11 wrapper uses the py::sequence protocol in various function declarations.

Similar to list and dict, these render to sequence in the newly generated stubfiles. However, unlike list and dict, sequence is not a reserved Python keyword. I think py::sequence should correspond to collections.abc.Sequence.

sizmailov commented 1 year ago

Hi!

Thanks for the report. I've added the replacement sequence -> typing.Sequence in #106

SimonHeim commented 1 year ago

Thanks for the quick turnaround @sizmailov!