This repository was archived by the owner on Mar 24, 2025. It is now read-only.
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Figure out what's wrong with config.Optional(config.DictOf) #159
Open
Description
DictOf does what we want without Optional but the combo confusingly always returns the default. This may just be something that we detect and say "don't do that" since it's unnecessary.
from baseplate import config
CONFIG = {
"foo": config.Optional(
config.DictOf(config.TupleOf(config.String)),
default={},
)
}
app_config = {
"foo.bar": "a, b, c, d",
"foo.baz": "e, f",
}
cfg = config.parse_config(app_config, CONFIG)
print(cfg.foo.bar)
prints {}
.