def parse_options():
 parser = OptionParser(usage=u'%prog name [options]', version=(u'Review Board ' + get_version_string()))
 parser.add_option(u'--class-name', dest=u'class_name', default=None, help=u'class name of extension (capitalized no spaces)')
 parser.add_option(u'--package-name', dest=u'package_name', default=None, help=u'package name of extension (lower case with underscores)')
 parser.add_option(u'--description', dest=u'description', default=None, help=u'description of extension')
 parser.add_option(u'--author', dest=u'author', default=None, help=u'author of the extension')
 parser.add_option(u'--is-configurable', dest=u'is_configurable', action=u'store_true', default=False, help=u'whether this extension is configurable')
 (globals()[u'options'], args) = parser.parse_args()
 if (len(args) != 1):
  print(u'Error: incorrect number of arguments')
  parser.print_help()
  exit((-1))
 options.extension_name = args[0]
 autofill_unprovided_options()

def parse_options ( ) : parser = OptionParser ( usage = u'%prog name [options]' , version = ( u'Review Board ' + get_version_string ( ) ) ) parser . add_option ( u'--class-name' , dest = u'class_name' , default = None , help = u'class name of extension (capitalized no spaces)' ) parser . add_option ( u'--package-name' , dest = u'package_name' , default = None , help = u'package name of extension (lower case with underscores)' ) parser . add_option ( u'--description' , dest = u'description' , default = None , help = u'description of extension' ) parser . add_option ( u'--author' , dest = u'author' , default = None , help = u'author of the extension' ) parser . add_option ( u'--is-configurable' , dest = u'is_configurable' , action = u'store_true' , default = False , help = u'whether this extension is configurable' ) ( globals ( ) [ u'options' ] , args ) = parser . parse_args ( ) if ( len ( args ) != 1 ) : print ( u'Error: incorrect number of arguments' ) parser . print_help ( ) exit ( ( - 1 ) ) options . extension_name = args [ 0 ] autofill_unprovided_options ( )
returns the parsed cli options .