Skip to content

Do not set values for arguments not provided by the user #18

@ghost

Description

We need to know if a particular argument has been explicitly set by the user, or it is just the default value.
pydantic provides model.__fields_set__ to check for those, however pydantic-argparsecurrently sets all values, regardless of the user input.

A way of doing this is by not setting defaults in argparse and leave pydantic processing those instead.

I've modified the code in my fork, and I would be happy to contribute a PR.

Thanks.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions