Skip to content

incorrect display of default parameter for optional argument #242

Open

Description

@JLSteenwyk

[REQUIRED] Describe the bug
For optional arguments, the default argument is not displayed properly.

[REQUIRED] To Reproduce
This behavior was discovered when using Enums.

For example,
with the following Enum:

class Choices(Enum):
    one = "one"
    two = "two"
    three = "three"

and the following function:

def funct(
    input: LatchFile,
    option: Optional[Choices] = Choices.two,
) -> LatchDir:

the default argument displayed for option in the Workflow interface will be "one" instead of "two".

[REQUIRED] Expected behavior
I expected the default argument to be "two."

[REQUIRED] Platform Information
General information about host platform + SDK

  • macOS Monterey, Version 12.5.1
  • Google Chrome, Version 111.0.5563.110
  • Latch, Version 2.14.2

Additional context
I understand this is a weird use case because workflow developers should probably just not set the option argument to be Optional but I suspect some may be doing this, as I have.

Activity

  1. added
    bug
    on Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions