Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/corvus_python/storage/storage_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ class DataLakeLayer(str, Enum):
SILVER = "silver"
GOLD = "gold"

def __str__(self):
"""Returns the string representation of the data lake layer.
The default behaviour of Enums with "mix-ins" changed in Python 3.11
to return the member name instead of the value, so we need to be explicit
to maintain backward compatibility. See: https://github.com/python/cpython/pull/22392
TODO: once Python 3.10 compatibility is no longer required, use StrEnum instead
and remove this method.

Returns:
str: The string representation of the data lake layer.
"""
return self.value


class StorageConfiguration(ABC):
"""Base class for a class that provides configuration for persistent storage.
Expand Down
Loading