Skip to content

nargs=1 in argparse produces list instead of value #14

@volksen

Description

@volksen

Hi,

thank for your great package. Exactly what I was looking for.
I think, I found a bug in commandline.py in the CliFlags class
You are using nargs=1 in Flags Save and log-level which produces a list instead of the value itself.
(see: https://docs.python.org/3/library/argparse.html#nargs)

When I run the following code on python 3.10.6 with the latest argparse and springs:
python app.py -l WARNING
I get the following error: TypeError: unhashable type: 'list'
Same happens with option -s for save.

Removing nargs=1 fixes the issue in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions