class CustomItem(Item):
pass
config = Config({'x': 23}, item_cls=CustomItem)
assert config.cm__item_cls is CustomItem
assert isinstance(config.x, CustomItem)
This doesn't guarantee that all items will be of that class. If items have been created before, we shouldn't touch them of course (apart from the usual name assigning).
parse_config_declaration is no longer cool because generating a OrderedDict is very different from generating a Config. Should probably move it to Config itself and no longer support custom tree_cls.
This doesn't guarantee that all items will be of that class. If items have been created before, we shouldn't touch them of course (apart from the usual name assigning).