Skip to content

Allow properties to be specified through type hints alone without s/p value inheritance #60

Closed
@bckohan

Description

@bckohan

For example:

    import typing as t
    from enum_properties import EnumProperties, S
    from enum import auto

    class Color(EnumProperties):
        
        rgb: t.Tuple[int, int, int]
        hex: t.Annotated[str, S(case_fold=True)]

        RED    = auto(), (1, 0, 0), 'ff0000'
        GREEN  = auto(), (0, 1, 0), '00ff00'
        BLUE   = auto(), (0, 0, 1), '0000ff'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions