mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2025-01-10 14:14:27 +00:00
python 10 compat
This commit is contained in:
parent
566d5211bb
commit
444ecbaf04
1 changed files with 9 additions and 1 deletions
|
@ -4,10 +4,18 @@ Maps to change the loaded .yaml from nwb schema before it's given to the nwb_sch
|
||||||
|
|
||||||
import ast
|
import ast
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import StrEnum
|
|
||||||
from typing import ClassVar, List, Optional
|
from typing import ClassVar, List, Optional
|
||||||
|
|
||||||
|
if sys.version_info.minor < 11:
|
||||||
|
from enum import StrEnum
|
||||||
|
else:
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
class StrEnum(str, Enum):
|
||||||
|
"""StrEnum-ish class for python 3.10"""
|
||||||
|
|
||||||
|
|
||||||
class SCOPE_TYPES(StrEnum):
|
class SCOPE_TYPES(StrEnum):
|
||||||
"""When a mapping should be applied
|
"""When a mapping should be applied
|
||||||
|
|
Loading…
Reference in a new issue