The enums issue #13
dwsmith1983
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
#2 is about supporting this workflow: from enum import Enum
class Color(Enum):
RED = Enum.auto()
GREEN = Enum.auto()
BLUE = Enum.auto()
@dataclass
class Config:
color: Color
dataconf.load("""color = "test"""", Config))
# raise UnexpectedValueException or better named exception
dataconf.load("""color = "red"""", Config))
# Config(color=Color.RED)
dataconf.load("""color = "RED"""", Config))
# Config(color=Color.RED) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the enums issue about?
Beta Was this translation helpful? Give feedback.
All reactions