Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Use proper argparse subparsers #29
Currently, Flask-script always uses
Looks quite natural, all options before create_user apply to the app itself, all after create_user to the command. Argparse supports this through subparsers.
Unfortunately, the current implementation requires this:
These two are incredibly annoying - there's no way to alias or reuse a commandline, because in both cases you have to edit it somewhere in the middle to change the command. Using the better way described up top, Flask-Script will complain that it doesn't know the command -c. This is mainly because the extension is not properly using argparse, but rather creating multiple parsers on the fly and using a custom crutch to handle commands.