Skip to content

Enum editor unable to display un-hashable types. #781

@midhun-pm

Description

@midhun-pm

The Enum editor is unable to display drop-down menus that contain unhashable types such as lists, sets, etc.
The cause of the issue is in in traitsui.helper when trying to create the inverse mapping.

Example: The following valid declaration will raise a TypeError

from traits.api import *


class TestClass(HasTraits):

    sets = Enum({1}, {2}, {3})


TestClass().configure_traits()

Metadata

Metadata

Assignees

No one assigned

    Labels

    ETS BacklogGood issue for ETS team members to look attype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions