Skip to content

Support Union of Enum and/or Literal in annotations for with_annotated decorator #1686

@neoniobium

Description

@neoniobium

Feature Request

Support Union of Enum and/or Literal in annotations for with_annotated decorator. Especially unions for different Enums seams to be desirable to reduce code duplication.

Code Example

class App(Cmd):

    @with_annotated
    def do_something_with_enums(a: EnumA, b: EnumB, combine: EnumA | EnumB) -> None:
        ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions