Details
Description
- projection_type = Attr(field_type=str, default=EEG_POLYMORPHIC_IDENTITY) + projection_type = Attr(field_type=str, default=ProjectionsType.EEG.value)
why not field_type=ProjectionsType, default=ProjectionsType.EEG ?
The actual value of an enum is an implementation detail.
or with neotraits support, perhaps more concisely,
projection_type = EnumAttr(default=ProjectionsType.EEG) with internally initializing field_type=default.__class__?
Pushing this further the enum class could also allow generating instances from a enum member directly, since manually coding that is error-prone.