[3.11] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104809)

[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)
(cherry picked from commit f4e2049f14)

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-05-23 12:48:20 -07:00 committed by GitHub
parent ac12a6bf34
commit 582aadc80e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -1170,7 +1170,7 @@ class Enum(metaclass=EnumType):
DeprecationWarning,
stacklevel=3,
)
for v in last_values:
for v in reversed(last_values):
try:
return v + 1
except TypeError: