Allow StrEnum from backports for python <3.11
This commit is contained in:
@@ -36,6 +36,11 @@ jobs:
|
||||
run: |
|
||||
pip install backports.zoneinfo
|
||||
|
||||
- name: Backport StrEnum
|
||||
if: matrix.python-version < '3.11'
|
||||
run: |
|
||||
pip install backports.strenum
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python -m pytest tests
|
||||
|
||||
+5
-1
@@ -3,7 +3,6 @@ Classes for stroing various configurations needed for reduction.
|
||||
"""
|
||||
import argparse
|
||||
from dataclasses import dataclass, field, Field, fields, MISSING
|
||||
from enum import StrEnum
|
||||
from typing import get_args, get_origin, List, Optional, Tuple, Union
|
||||
from datetime import datetime
|
||||
from os import path
|
||||
@@ -11,6 +10,11 @@ import numpy as np
|
||||
|
||||
import logging
|
||||
|
||||
try:
|
||||
from enum import StrEnum
|
||||
except ImportError:
|
||||
from backports.strenum import StrEnum
|
||||
|
||||
@dataclass
|
||||
class CommandlineParameterConfig:
|
||||
argument: str # default parameter for command line resutign ins "--argument"
|
||||
|
||||
Reference in New Issue
Block a user