diff --git a/statelint/fields/common.py b/statelint/fields/common.py index 7b674f3..f61e63e 100644 --- a/statelint/fields/common.py +++ b/statelint/fields/common.py @@ -1,9 +1,9 @@ import json -from enum import Enum +from enum import StrEnum from typing import Any -class Comparison(str, Enum): +class Comparison(StrEnum): STRING_EQUALS = "StringEquals" STRING_LESS_THAN = "StringLessThan" STRING_GREATER_THAN = "StringGreaterThan" @@ -45,7 +45,7 @@ class Comparison(str, Enum): STRING_MATCHES = "StringMatches" -class StateType(str, Enum): +class StateType(StrEnum): PASS = "Pass" SUCCEED = "Succeed" FAIL = "Fail" diff --git a/statelint/problem/problem_type.py b/statelint/problem/problem_type.py index 1936bba..eaee10b 100644 --- a/statelint/problem/problem_type.py +++ b/statelint/problem/problem_type.py @@ -1,7 +1,7 @@ -from enum import Enum +from enum import StrEnum -class ProblemType(str, Enum): +class ProblemType(StrEnum): # type check FLOAT = "a Float" STRING = "a String"