@classmethod
def register_arguments(cls, parser):
    """Register command line options.

        Implement this method for normal options behavior with protection from
        OptionConflictErrors. If you override this method and want the default
        --$name option(s) to be registered, be sure to call super().
        """
    if hasattr(cls, '_dont_register_arguments'):
        return
    prefix = cls.configuration_key_prefix()
    cfgkey = cls.configuration_key
    parser.add_argument('--%s-%s' % (prefix, cfgkey), action='store_true',
        dest='%s_%s' % (prefix, cfgkey), default=False, help='%s: %s' % (
        cls.__name__, cls.help()))
    args = cls.init_argnames()
    defaults = cls._init_argdefaults()
    for arg in args[0:len(args) - len(defaults)]:
        parser.add_argument('--%s-%s-%s' % (prefix, cfgkey, arg), dest=
            '%s_%s_%s' % (prefix, cfgkey, arg), help='')
    for i, arg in enumerate(args[len(args) - len(defaults):]):
        parser.add_argument('--%s-%s-%s' % (prefix, cfgkey, arg), dest=
            '%s_%s_%s' % (prefix, cfgkey, arg), default=defaults[i], help=
            'default: %(default)s')
