Obscure error if assign is used instead of an annotation.
AdamHillier opened this issue · 1 comments
AdamHillier commented
If an assignment is used instead of an annotation for a nested component there is an obscure error.
E.g. if a user defines a model as:
class FancyModel(Model):
dataset = Dataset
...
and runs configure
, either directly or through the CLI, the following error is produced: TypeError: configure() missing 1 required positional argument: 'conf'
.
The correct line should either be dataset: Dataset
or dataset = Dataset(...)
.
We should detect this mistake and print a warning.
AdamHillier commented
Closed by #109