Skip to content

latch get-params create wrong Enum names #479

@yuhanH

Description

@yuhanH

This is a similar issue with #137
Specifically, I have defined an Enum object as follows:

class out_format(Enum):
    h5ad = "--h5ad"
    loom = "--loom"
    raw = "raw"

However, when using latch get-params, the command appears to redefine the Enum names as the same with the Enum values, resulting in an incorrect format name:

class out_format(Enum):
    --h5ad = '--h5ad'
    --loom = '--loom'
    raw = 'raw'

here is the line:

if variant in keyword.kwlist:
variant_name = f"_{variant}"
else:
variant_name = variant

It would be beneficial to retain the original Enum names. I am not certain if the original Enum names are stored, as they were not found in the response variable of the _launch_workflow function.
response = requests.post(url, headers=headers, json=_interface_request)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions