Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect display of default parameter for optional argument #242

Open
JLSteenwyk opened this issue Mar 28, 2023 · 0 comments
Open

incorrect display of default parameter for optional argument #242

JLSteenwyk opened this issue Mar 28, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@JLSteenwyk
Copy link
Contributor

[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.

@JLSteenwyk JLSteenwyk added the bug Something isn't working label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants