Open
Description
With this Rust code
#[gen_stub_pyclass_enum]
#[pyclass(eq, eq_int)]
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum DayTime {
Day,
Night
}
#[gen_stub_pyfunction]
#[pyo3(signature = ( day_time = DayTime.Day ))]
fn some_function(day_time: DayTime) {
// ...
}
some_function
will get annotated as
def some_function(day_time:DayTime=...): ...
I understand for complex classes defaulting to ...
makes sense, but especially for enums it would be very helpful to know the default enum value and it shouldn't be too hard to implement.
If you agree I am happy to look into it and make a PR, will take me a bit to get more familiar with the code though, would be happy for anyone to give me some leads.
Metadata
Metadata
Assignees
Labels
No labels