Skip to content

Conversation

LeoWherle
Copy link

Example of previously non-working case:

use pyo3_stub_gen::derive::{gen_stub_pyclass, gen_stub_pymethods};
use pyo3::prelude::*;

#[gen_stub_pyclass]
struct MyStruct(u32);

#[gen_stub_pymethods]
impl MyStruct {
    fn __getnewargs__(&self) -> PyResult<(u32,)> {
        Ok((0,))
    }
}

@LeoWherle LeoWherle changed the title Allow single element tuple as return type Allow single element tuple as return type (small fix) Jul 19, 2025
@termoshtt termoshtt self-requested a review July 26, 2025 06:52
@termoshtt
Copy link
Member

Thanks PR! But this has been fixed as a part of #208

@termoshtt termoshtt closed this Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants