I made a typo in the lastgenreconfig and put in whiltelist instead of whitelist. Surprisingly this resulted in a working config although the config entry which made no sense.
lastgenre:
auto: no
canonical: /data/genres-tree.yaml
whiltelist: /data/genres.txt
whitelist: yes
This is also true for other plugins as e.g. zero. What I also noticed is that beets does not complain about having:
zero:
auto: yes
zero:
auto: no
Unfortunately, this kind of behavior is pretty integral to the way we process configuration files. For a deeper explanation, it might help to read the documentation for our homegrown configuration library, Confuse. Following Python-like semantics, it only checks types and names lazily, when accessing attributes鈥攏ot eagerly, when loading the plugin. This makes it really easy to add new configuration options, but the trade-off is that we fundamentally can't catch typos like this.
So while I understand the problem, this is unlikely to get fixed without a detailed proposal for how to evolve Confuse to safely enforce config structure.
Thanks for the elaborate answer. Maybe voluptuous can be used to achieve this. Home Assistant makes use of this to ensure its yaml config is consistent.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Thanks for the elaborate answer. Maybe voluptuous can be used to achieve this. Home Assistant makes use of this to ensure its yaml config is consistent.