Skip to content

Cannot parse list of strings containing is #481

Closed as not planned
Closed as not planned
@rentruewang

Description

@rentruewang

Reproduce as such:

# example.py
import fire
def main(hello: list[str]):
    print(hello)
fire.Fire(main)
python example.py --hello '[this,is,nice]'

This would yield the unexpected output where in the main function hello would be a string "[this,is,nice]". The correct behavior should be ["this", "is", "nice"]

This doesn't happen with non-keywords.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions