-
Notifications
You must be signed in to change notification settings - Fork 7
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
Workaround for shortform arguments #489
Conversation
This PR is a bit of a hack to get short arguments working again. Another suggested workaround was given by the creator of pydantic-argparse: such that:
My approach modifies the input string before sending it to the parser. |
…ct immediately after parser creation
After yesterday's discussion, I implemented the short form arguments using the suggested approach where I add them directly to the parser object immediately after it is created:
I created a new function to do this and have it residing in the same file as the parser generation. Within that function are all of the key value pairs for the short and long arguments. |
I modified this so that the Example:
Name is used to create the long argument. I use the alias later to add the short argument after parser creation. |
Addresses the last part of: #438 |
An attempt to create a workaround so that we can use shortform arguments with the pydantic-argparse package.