gemseo / utils

Show inherited members

enumeration module

Enumerations tools.

gemseo.utils.enumeration.merge_enums(name, base_enum_class, *enums, doc='')[source]

Create an enum from other ones.

This is useful because an enum class cannot be derived for extension with other enum items.

  • name (str) – The name of the enum class to create.

  • base_enum_class (type[enum.Enum]) – The base enum class to derive from.

  • *enums (type[enum.Enum]) – The enum classes to be merged in.

  • doc (str) –

    The new enum class docstring.

    By default it is set to “”.


The created enum class.

Return type: