Fix enums from Python 3.11: use ReprEnum (#1700)

This commit is contained in:
Disconnect3d 2023-05-08 11:58:17 +02:00 committed by GitHub
parent 487afacc7a
commit c19c6c324b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,13 @@
import copy
import importlib
from collections import OrderedDict
from enum import Enum
try:
# Python 3.11, see https://docs.python.org/3/whatsnew/3.11.html#enum
from enum import ReprEnum as Enum
except ImportError:
from enum import Enum
from typing import Any
from typing import Callable
from typing import Dict