Nested Dataclasses

Custom nested dataclass for convenient access of nested dataclass attributes.

ecgan.config.nested_dataclass.nested_dataclass_asdict(datacls)[source]

Return a nested dataclass as a dict (convenience function).

Return type

Dict

ecgan.config.nested_dataclass.nested_dataclass(*args, **kwargs)[source]

Nested dataclass annotation.

Normal dataclasses are difficult to use in a nested way and the types are not correctly inferred. Annotating a dataclass with the nested_dataclass allows an easy use.