Hi all, I wonder that is there any plans to support complex enum variants. e.g., if I add variants to enum but sub-gen doesn't catch the variants for now. ``` #[gen_stub_pyclass_enum] #[pyclass(eq, eq_int)] #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum Number { #[pyo3(name = "FLOAT")] Float(f32), #[pyo3(name = "INTEGER")] Integer(usize), Test { a: usize, b: usize }, } ``` generates ``` class Number(Enum): FLOAT = auto() INTEGER = auto() Test = auto() ``` but wants, not sure though, pyo3 may generates additional 'class' for complex enum variants, it probably looks like following..? ``` class Number(Enum): FLOAT = auto() INTEGER = "INTEGER" Test = "Test" class INTEGER: _0: int class Test: a: int b: int ``` Any plans to support this feature?
Activity
flying-sheep commentedon Dec 12, 2024
No, it looks something like the following:
evonreis commentedon May 29, 2025
New macro for enum args proposed in #208
kstreee-furiosa commentedon May 30, 2025
Amazing!! I'll try the new macro when it has been merged..!
termoshtt commentedon Jul 19, 2025
Resolved in #208