Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename_all is ignored #147

Open
remi-dupre opened this issue Feb 3, 2025 · 0 comments
Open

rename_all is ignored #147

remi-dupre opened this issue Feb 3, 2025 · 0 comments

Comments

@remi-dupre
Copy link

Hello!

I'll try to take some time to fix this, but I open an issue in case I don't make time for it!

Given the following enum definition :

#[gen_stub_pyclass_enum]
#[pyclass(ord, eq, frozen, hash, str, rename_all = "UPPERCASE")]
#[derive(Hash, PartialOrd, Ord, PartialEq, Eq)]
pub enum State {
    Open,
    Closed,
    Unknown,
}

The output stub looks like this :

class State(Enum):
    Open = auto()
    Closed = auto()
    Unknown = auto()

However, because of the rename_all = "UPPERCASE" the actual enum variants are OPEN, CLOSED and UNKNOWN.

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

No branches or pull requests

1 participant