Skip to content

Commit 077139c

Browse files
committed
Replace StrEnum by double inheritance
Our Windows pipeline only has Python 3.9, which does not include StrEnum. Therefore, replace all StrEnum by a double str and Enum import. accomplishing the same thing.
1 parent c144de9 commit 077139c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/obelisk/types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from enum import StrEnum
1+
from enum import Enum
22
from typing import List, Any, Optional
33

44
from pydantic import BaseModel
55

66

7-
class IngestMode(StrEnum):
7+
class IngestMode(str, Enum):
88
"""
99
Classic Obelisk accepts three ways of submitting new data.
1010
This integrates with the concept of Streams,
@@ -22,7 +22,7 @@ class IngestMode(StrEnum):
2222
STORE_ONLY = 'store_only'
2323

2424

25-
class TimestampPrecision(StrEnum):
25+
class TimestampPrecision(str, Enum):
2626
"""
2727
When ingesting data it is important to specify which precision provided UNIX timestamps are in.
2828
If a provided timestamp is in seconds,
@@ -50,6 +50,6 @@ class QueryResult(BaseModel):
5050
cursor: Optional[str] = None
5151

5252

53-
class ObeliskKind(StrEnum):
53+
class ObeliskKind(str, Enum):
5454
CLASSIC = 'classic'
5555
HFS = 'hfs'

0 commit comments

Comments
 (0)