Closed srak289 closed 2 years ago
> layout.py : 28 During construction of schema items in the
> `layout._load()` function `full_key` is only checked against
> `ConfigSchema._schemas`. This will always evaluate to `False` for
> sub-keys in the config file.
For leaf keys, yes this will be false. But the intent of that check is to figure out whether we are loading something that has a prefix. Consider
class Schema(ConfigSchema, prefix="foo.bar.baz"): pass
Then foo.bar.baz will be in ConfigSchema._schemas. It's not subkeys in config files we're check for, but rather to see if there is a registered schema. Because if there is, we want to require a dict from the file we're loading.
Do you still think this is a bug?
Ah, that makes sense.
No, it does not seem like a bug with that additional perspective.
layout.py : 28 During construction of schema items in the
layout._load()
functionfull_key
is only checked againstConfigSchema._schemas
. This will always evaluate toFalse
for sub-keys in the config file.This may be inconsequential but I believe it is a bug.