Skip to content

Move from optparse to argparse

argparse is the way of the future. Also, it has support for doing much more clever things, like proper support for subcommands.

Ultimately we'll want to do input checks, subcommands, and more, but for step 1: just get it working with argparse.

Needed fixes for now

  • fix ordering issue with positional and non-positional arguments

For the future

  • #26 (closed) unify argument parsing logic into one place
  • #27 (closed) Move "Available commands in Glance" to argparse epilog
  • #28 (closed) Make the command a first tier argument
  • try to transition our commands to be actual sub-parsers
  • reevaluate what we can do with input checks
Edited by Eva Schiffer