Allow StrEnum from backports for python <3.11

This commit is contained in:
2025-10-06 16:36:26 +02:00
parent a3dccb8429
commit 9ce902d82c
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -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
View File
@@ -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"