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

pull/1701/head
Disconnect3d 3 years ago committed by GitHub
parent 487afacc7a
commit c19c6c324b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,13 @@
import copy import copy
import importlib import importlib
from collections import OrderedDict 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 Any
from typing import Callable from typing import Callable
from typing import Dict from typing import Dict

Loading…
Cancel
Save