Add command line options.

    :return: None.
973054
def add_options(ctx):
    
    # Add option
    ctx.add_option(
        '--always',
        action='store_true',
        default=False,
        dest='always',
        help='whether always run tasks.',
    )

    # Add option
    ctx.add_option(
        '--check-import',
        action='store_true',
        default=False,
        dest='check_import',
        help='whether import module for dirty checking.',
    )

    # Add option
    ctx.add_option(
        '--venv',
        dest='venv',
        help=(
            'virtual environment directory relative path relative to top'
            ' directory.'
        ),
    )

    # Add option
    ctx.add_option(
        '--venv-add-version',
        default='1',
        dest='venv_add_version',
        # Convert to int so that the value can be used as boolean
        type=int,
        metavar='0|1',
        help=(
            'whether add full Python version to virtual environment directory'
            ' name. E.g. `.py3.5.1.final.0.64bit`. Default is add.'
        ),
    )

    # Add option
    ctx.add_option(
        '--req',
        default=None,
        dest='req_path',
        help='requirements file relative path relative to top directory.',
    )
1300356
def options(self, parser, env=None):
        
        if env is None:
            env = os.environ
        env_opt_name = 'NOSE_%s' % self.__dest_opt_name.upper()
        parser.add_option("--%s" % self.__opt_name,
                          dest=self.__dest_opt_name,
                          type="string",
                          default=env.get(env_opt_name),
                          help=".ini file providing the environment for the "
                               "test web application.")
328908
def set_options(self, **kwargs):
        
        options = self.options
        options.update(kwargs)
        self.update(options=options)
86775
def add_arguments(self):
        
        if self.parser is None:
            raise TypeError("Parser cannot be None, has create_parser been called?")

        for keys, kwargs in self.args.items():
            if not isinstance(keys, tuple):
                keys = (keys,)
            self.parser.add_argument(*keys, **kwargs)
126561
def add_arguments(self, parser):
        
        super(Command, self).add_arguments(parser)

        parser.add_argument('--badges',
                            action='store',
                            dest='badges',
                            type=str)

        parser.add_argument('--db-read',
                            action='store',
                            dest='db_read',
                            type=str)

        parser.add_argument('--disable-signals',
                            action='store_true',
                            dest='disable_signals')

        parser.add_argument('--batch-size',
                            action='store',
                            dest='batch_size',
                            type=int)

        parser.add_argument('--update',
                            action='store_true',
                            dest='update')

        parser.add_argument('--exclude-badges',
                            action='store',
                            dest='exclude_badges',
                            type=str)
952037
def add_local_option(self, *args, **kw):
        
        try:
            group = self.local_option_group
        except AttributeError:
            group = SConsOptionGroup(self, 'Local Options')
            group = self.add_option_group(group)
            self.local_option_group = group

        result = group.add_option(*args, **kw)

        if result:
            # The option was added successfully.  We now have to add the
            # default value to our object that holds the default values
            # (so that an attempt to fetch the option's attribute will
            # yield the default value when not overridden) and then
            # we re-parse the leftover command-line options, so that
            # any value overridden on the command line is immediately
            # available if the user turns around and does a GetOption()
            # right away.
            setattr(self.values.__defaults__, result.dest, result.default)
            self.reparse_local_options()

        return result
114537
def add_command(self, cmd, name=None):
        
        name = name or cmd.name
        if name is None:
            raise TypeError('Command has no name.')
        self.commands[name] = cmd
1374761
def addOptions(parser, config=Config()):
    
    # Wrapper function that allows toil to be used with both the optparse and
    # argparse option parsing modules
    addLoggingOptions(parser)  # This adds the logging stuff.
    if isinstance(parser, ArgumentParser):
        def addGroup(headingString, bodyString):
            return parser.add_argument_group(headingString, bodyString).add_argument

        parser.register("type", "bool", lambda v: v.lower() == "true")  # Custom type for arg=True/False.
        _addOptions(addGroup, config)
    else:
        raise RuntimeError("Unanticipated class passed to addOptions(), %s. Expecting "
                           "argparse.ArgumentParser" % parser.__class__)
564727
def _add_plugin_options(self, available_plugins: Set[Type[Plugin]]) -> None:
        
        for plugin_class in available_plugins:
            # Add the current plugin's commands to the parser
            group = OptionGroup(self._parser, plugin_class.get_title(), plugin_class.get_description())
            for option in plugin_class.get_cli_option_group():
                group.add_option(option)
            self._parser.add_option_group(group)
1344818
def add_command_line_options(add_argument, use_short_options=True):
    
    logger_args = ("--enable-logger",)
    credentials_args = ("--credentials",)
    if use_short_options:
        logger_args += ('-l',)
        credentials_args += ('-c',)
    add_argument(*logger_args, dest='enabled_loggers',
                 action="append", default=[],
                 help="Enable the specified logger.")
    add_argument(*credentials_args, dest='credential_files',
                 action="append", default=[],
                 help="Use the specified credentials module to update "
                 "the values in okcupyd.settings.")
    add_argument('--echo', dest='echo', action='store_true', default=False,
                 help="Echo SQL.")
1176268
def add_commands(self):
        
        self.parser.add_argument(
            '-d',
            action="count",
            **self.config.default.debug.get_arg_parse_arguments())
543065
def add_options(options = {}, raw_options = nil)
      @options.merge!(options.stringify_keys) unless options.blank?
      @raw_options << raw_options unless raw_options.blank?
    end
941664
def add_arguments(self, parser):
        
        subparsers = parser.add_subparsers(help='sub-command help',
                                           dest='command')

        add_parser = partial(_add_subparser, subparsers, parser)

        add_parser('list', help="list concurrency triggers")
        add_parser('drop', help="drop  concurrency triggers")
        add_parser('create', help="create concurrency triggers")

        parser.add_argument('-d', '--database',
                            action='store',
                            dest='database',
                            default=None,
                            help='limit to this database')

        parser.add_argument('-t', '--trigger',
                            action='store',
                            dest='trigger',
                            default=None,
                            help='limit to this trigger name')
732156
def add_options(cls, parser):
        
        parser.add_option('--show-pydocstyle', action='store_true', help='show explanation of each PEP 257 error')
        parser.config_options.append('show-pydocstyle')
1374507
def add_options(cls, parser):
        """"""
        parser.add_option(
            '--putty-select', metavar='errors', default='',
            help='putty select list',
        )
        parser.add_option(
            '--putty-ignore', metavar='errors', default='',
            help='putty ignore list',
        )
        parser.add_option(
            '--putty-no-auto-ignore', action='store_false',
            dest='putty_auto_ignore', default=False,
            help=(' (default) do not auto ignore lines matching '
                  '# flake8: disable=<code>,<code>'),
        )
        parser.add_option(
            '--putty-auto-ignore', action='store_true',
            dest='putty_auto_ignore', default=False,
            help=('auto ignore lines matching '
                  '# flake8: disable=<code>,<code>'),
        )
        parser.config_options.append('putty-select')
        parser.config_options.append('putty-ignore')
        parser.config_options.append('putty-auto-ignore')
572203
private function configureOptions()
    {
        $this->addOption(
            self::OPTIONS_KEY_IMAGES,
            'i',
            InputOption::VALUE_OPTIONAL,
            'The list of docker images to use (comma or space delimited).'
        );
        $this->addOption(
            self::OPTIONS_KEY_CONFIGFILE,
            'c',
            InputOption::VALUE_OPTIONAL,
            'The path to the configuration file.'
        );
        $this->addOption(
            self::OPTIONS_KEY_SYNTAX,
            's',
            InputOption::VALUE_OPTIONAL,
            'A flag indicating whether to run syntax checks.'
        );
        $this->addOption(
            self::OPTIONS_KEY_SYNTAXCOMMAND,
            'S',
            InputOption::VALUE_OPTIONAL,
            'The command to run syntax checks.'
        );
        $this->addOption(
            self::OPTIONS_KEY_UNITTESTS,
            'u',
            InputOption::VALUE_OPTIONAL,
            'A flag indicating whether to run the unit test suite.'
        );
        $this->addOption(
            self::OPTIONS_KEY_UNITTESTSCOMMAND,
            'U',
            InputOption::VALUE_OPTIONAL,
            'The command to run the unit tests.'
        );
        $this->addOption(
            self::OPTIONS_KEY_PULL,
            'p',
            InputOption::VALUE_NONE,
            'A flag indicating to pull new images instead of running the linter or unit tests.'
        );
    }
1268838
def add_options(self):
        
        super(RtorrentXmlRpc, self).add_options()

        # basic options
        self.add_bool_option("-r", "--repr", help="show Python pretty-printed response")
        self.add_bool_option("-x", "--xml", help="show XML response")
        self.add_bool_option("-i", "--as-import",
            help="execute each argument as a private command using 'import'")
        self.add_bool_option("--session", "--restore",
            help="restore session state from .rtorrent session file(s)")

        # TODO: Tempita with "result" object in namespace
        #self.add_value_option("-o", "--output-format", "FORMAT",
        #    help="pass result to a template for formatting")

        self.proxy = None