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
When returning a std::array, the typing information is invalid, e.g. List[str[2]] for the code below. This causes tool such as mypy's stubgen or pybind11-stubgen to produce invalid stubs.
I guess it would be valid to generate List[str] in this case since Python does not have information about the size anyway?
. @rwgk@henryiii This doesn't seem to be a valid typing extension. Any idea why this data is included? We can use Annotated, but we need typing_extensions to backport that behavior. I guess we should remove that data or change the return type of a caster to a tuple / something that can handle it?
Activity
bricerebsamen commentedon Apr 28, 2022
@sizmailov for your attention please
Skylion007 commentedon Apr 29, 2022
Oddly enough, this is expected and tested behavior:
pybind11/tests/test_stl.py
Line 42 in 75007dd
Fix pybind#3912
Skylion007 commentedon May 3, 2022
@henryiii Any idea how we can support typing extensions?