Closed termoshtt closed 3 months ago
Option<>
of anything seems to be mapping to PyAny
🙁 And it's quite typical to have in the signature for kwargs that default to None
.
Also, Vec<T>
and other containers doesn't seem to work either if T
is a pyclass. E.g. if you have
#[pyclass]
struct X {}
#[pyclass]
struct Y {}
#[pyfunction]
fn f(x: Vec<X>) -> PyResult<Vec<Y>> {}
this will be encoded as
def f(x: Sequence[Any]) -> List[Any]: ...
experimental-inspect
has very limited feature. For example,Option<String>
should generatestr | None
(orOptional[str]
) in stub file, but it generatesAny
.