diff --git a/statelint/fields/common.py b/statelint/fields/common.py index 7b674f3..3d8c5d1 100644 --- a/statelint/fields/common.py +++ b/statelint/fields/common.py @@ -4,6 +4,9 @@ class Comparison(str, Enum): + def __str__(self) -> str: + return self.value + STRING_EQUALS = "StringEquals" STRING_LESS_THAN = "StringLessThan" STRING_GREATER_THAN = "StringGreaterThan" @@ -46,6 +49,9 @@ class Comparison(str, Enum): class StateType(str, Enum): + def __str__(self) -> str: + return self.value + PASS = "Pass" SUCCEED = "Succeed" FAIL = "Fail" diff --git a/statelint/problem/problem_type.py b/statelint/problem/problem_type.py index 1936bba..bf5783d 100644 --- a/statelint/problem/problem_type.py +++ b/statelint/problem/problem_type.py @@ -2,6 +2,9 @@ class ProblemType(str, Enum): + def __str__(self) -> str: + return self.value + # type check FLOAT = "a Float" STRING = "a String"