-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Normally, trying to access a missing literal "???" results in an error.
When a custom resolver returns "???", the missing literal can be accessed without throwing an error.
To Reproduce
>>> from omegaconf import OmegaConf
>>> OmegaConf.register_new_resolver("baz", lambda: "???")
>>> cfg = OmegaConf.create({"bar": "${baz:}"})
>>> print(cfg)
{'bar': '${baz:}'}
>>> print(cfg.bar)
???Expected behavior
I would expect that accessing cfg.bar raises a MissingMandatoryValue or an InterpolationToMissingValueError instead of printing the string "???".
Additional context
- OmegaConf version: on master branch
- Python version: 3.9.5
I became aware of this while studying this issue:
env resolver with ??? default not considered as MISSING #759.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working