This updates generated classes for string enums to use the StrEnum base that was introduced in 3.11. Members of classes inheriting from StrEnum can be used as strings for most purposes. They do, however, have a repr and a type that is not compatible. Since we aren't actually using them in the type signature or returning them, these aren't important.
This doesn't majorly change the way customers engage with the generated class, though it does remove the need to generate a values method to list known values.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This updates generated classes for string enums to use the StrEnum base that was introduced in 3.11. Members of classes inheriting from StrEnum can be used as strings for most purposes. They do, however, have a repr and a type that is not compatible. Since we aren't actually using them in the type signature or returning them, these aren't important.
This doesn't majorly change the way customers engage with the generated class, though it does remove the need to generate a
values
method to list known values.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.