Skip to content

Commit 9a4a64d

Browse files
Copilotwoodruffw
andcommitted
Fix UP042 lint errors by using StrEnum instead of (str, Enum)
Co-authored-by: woodruffw <3059210+woodruffw@users.noreply.github.com>
1 parent 194120e commit 9a4a64d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

limbo/models.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from datetime import datetime
4-
from enum import Enum
4+
from enum import StrEnum
55
from functools import cached_property
66
from typing import Annotated, Literal
77

@@ -16,7 +16,7 @@
1616
)
1717

1818

19-
class ExpectedResult(str, Enum):
19+
class ExpectedResult(StrEnum):
2020
"""
2121
Represents an expected testcase evaluation result.
2222
"""
@@ -25,7 +25,7 @@ class ExpectedResult(str, Enum):
2525
FAILURE = "FAILURE"
2626

2727

28-
class ActualResult(str, Enum):
28+
class ActualResult(StrEnum):
2929
"""
3030
Represents the actual result of a testcase evaluation.
3131
"""
@@ -35,7 +35,7 @@ class ActualResult(str, Enum):
3535
SKIPPED = "SKIPPED"
3636

3737

38-
class PeerKind(str, Enum):
38+
class PeerKind(StrEnum):
3939
"""
4040
Different types of peer subjects.
4141
"""
@@ -54,7 +54,7 @@ class PeerName(BaseModel):
5454
value: StrictStr = Field(..., description="The peer's name")
5555

5656

57-
class SignatureAlgorithm(str, Enum):
57+
class SignatureAlgorithm(StrEnum):
5858
"""
5959
Valid X.509 signature algorithms.
6060
"""
@@ -94,7 +94,7 @@ class SignatureAlgorithm(str, Enum):
9494
GOSTR3410_2012_WITH_3411_2012_512 = "GOSTR3410_2012_WITH_3411_2012_512"
9595

9696

97-
class KeyUsage(str, Enum):
97+
class KeyUsage(StrEnum):
9898
"""
9999
X.509 key usages.
100100
@@ -112,7 +112,7 @@ class KeyUsage(str, Enum):
112112
decipher_only = "decipherOnly"
113113

114114

115-
class KnownEKUs(str, Enum):
115+
class KnownEKUs(StrEnum):
116116
"""
117117
Well-known extended key usages, from RFC 5280.
118118
@@ -143,7 +143,7 @@ class KnownEKUs(str, Enum):
143143
"""
144144

145145

146-
class Feature(str, Enum):
146+
class Feature(StrEnum):
147147
"""
148148
Feature tags for testcases.
149149
"""
@@ -221,7 +221,7 @@ class Feature(str, Enum):
221221
"""
222222

223223

224-
class Importance(str, Enum):
224+
class Importance(StrEnum):
225225
"""
226226
A subjective ranking of a testcase's importance.
227227
"""
@@ -256,7 +256,7 @@ class Importance(str, Enum):
256256
"""
257257

258258

259-
class ValidationKind(str, Enum):
259+
class ValidationKind(StrEnum):
260260
"""
261261
The kind of validation to perform.
262262
"""

0 commit comments

Comments
 (0)