Skip to content

IO: add info_kwargs to instantiate an Info object

Sebastian Müller requested to merge IO_info_kwargs into main

Finally found a way to scratch this itch of mine.

With **info_kwargs we could instantiate Info objects on the fly in IO object without breaking the current logic.

out = Output(name="test_out", grid=NoGrid(), units="meter")
# is equal to
out = Output(name="test_out", info=Info(grid=NoGrid(), meta=dict(units="meter")))

But it is still possible to set info to None

inp = Input(name="in", info=None)

Also the IOList respects that now:

self.inputs.add(name="in", grid=None, units="mm/d")

Merge request reports

Loading