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

[Python] Render enums as Python IntEnum #8145

Merged
merged 1 commit into from
Jun 3, 2024

Commits on Jun 2, 2024

  1. [Python] Render enums as Python IntEnum

    This allows enums to be type check with mypy.
    They will still behave like ints ->
    > IntEnum is the same as Enum,
    > but its members are also integers and can be used anywhere
    > that an integer can be used.
    > If any integer operation is performed with an IntEnum member,
    > the resulting value loses its enumeration status.
    https://docs.python.org/3/library/enum.html#enum.IntEnum
    
    Only if the --python-typing flag is set.
    fliiiix committed Jun 2, 2024
    Configuration menu
    Copy the full SHA
    fc4efd6 View commit details
    Browse the repository at this point in the history