Python argparse.SUPPRESS Examples

The following are 30 code examples of argparse.SUPPRESS(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module argparse , or try the search function .
Example #1
Source File: args.py    From wifite2mod with GNU General Public License v2.0 7 votes vote down vote up
def get_arguments(self):
        ''' Returns parser.args() containing all program arguments '''

        parser = argparse.ArgumentParser(usage=argparse.SUPPRESS,
                formatter_class=lambda prog: argparse.HelpFormatter(
                    prog, max_help_position=80, width=130))

        self._add_global_args(parser.add_argument_group(Color.s('{C}SETTINGS{W}')))
        self._add_wep_args(parser.add_argument_group(Color.s('{C}WEP{W}')))
        self._add_wpa_args(parser.add_argument_group(Color.s('{C}WPA{W}')))
        self._add_wps_args(parser.add_argument_group(Color.s('{C}WPS{W}')))
        self._add_pmkid_args(parser.add_argument_group(Color.s('{C}PMKID{W}')))
        self._add_eviltwin_args(parser.add_argument_group(Color.s('{C}EVIL TWIN{W}')))
        self._add_command_args(parser.add_argument_group(Color.s('{C}COMMANDS{W}')))

        return parser.parse_args() 
Example #2
Source File: panels_config.py    From grimoirelab-sirmordred with GNU General Public License v3.0 6 votes vote down vote up
def get_params_parser():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser(add_help=False)

    parser.add_argument('-g', '--debug', dest='debug',
                        action='store_true',
                        help=argparse.SUPPRESS)

    parser.add_argument("--cfg", dest='cfg_path',
                        help="Configuration file path")
    parser.add_argument("--dashboards", action='store_true', dest='dashboards',
                        help="Upload dashboards")
    parser.add_argument("--menu", action='store_true', dest='menu',
                        help="Upload menu")

    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)

    return parser 
Example #3
Source File: config.py    From jbox with MIT License 6 votes vote down vote up
def parser(self):
        kwargs = {
            "usage": self.usage,
            "prog": self.prog
        }
        parser = argparse.ArgumentParser(**kwargs)
        parser.add_argument("-v", "--version",
                action="version", default=argparse.SUPPRESS,
                version="%(prog)s (version " + __version__ + ")\n",
                help="show program's version number and exit")
        parser.add_argument("args", nargs="*", help=argparse.SUPPRESS)

        keys = sorted(self.settings, key=self.settings.__getitem__)
        for k in keys:
            self.settings[k].add_option(parser)

        return parser 
Example #4
Source File: flexargparser.py    From ngraph-python with Apache License 2.0 6 votes vote down vote up
def setup_flex_args(argParser):
        """
        Add flex specific arguments to other default args used by ngraph
        """
        # use fixed point for flex backend
        argParser.add_argument('--fixed_point',
                               action="store_true",
                               help=argparse.SUPPRESS)
        # turn on flex verbosity for debug
        argParser.add_argument('--flex_verbose',
                               action="store_true",
                               help=argparse.SUPPRESS)
        # collect flex data and save it to h5py File
        argParser.add_argument('--collect_flex_data',
                               action="store_true",
                               default=argparse.SUPPRESS) 
Example #5
Source File: registry.py    From fairseq with MIT License 6 votes vote down vote up
def set_defaults(args, cls):
    """Helper to set default arguments based on *add_args*."""
    if not hasattr(cls, 'add_args'):
        return
    parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS, allow_abbrev=False)
    cls.add_args(parser)
    # copied from argparse.py:
    defaults = argparse.Namespace()
    for action in parser._actions:
        if action.dest is not argparse.SUPPRESS:
            if not hasattr(defaults, action.dest):
                if action.default is not argparse.SUPPRESS:
                    setattr(defaults, action.dest, action.default)
    for key, default_value in vars(defaults).items():
        if not hasattr(args, key):
            setattr(args, key, default_value) 
Example #6
Source File: curses_ui_test.py    From auto-alt-text-lambda-api with MIT License 6 votes vote down vote up
def _print_ones(self, args, screen_info=None):
    ap = argparse.ArgumentParser(
        description="Print all-one matrix.", usage=argparse.SUPPRESS)
    ap.add_argument(
        "-s",
        "--size",
        dest="size",
        type=int,
        default=3,
        help="Size of the matrix. For example, of the value is 3, "
        "the matrix will have shape (3, 3)")

    parsed = ap.parse_args(args)

    m = np.ones([parsed.size, parsed.size])

    return tensor_format.format_tensor(m, "m") 
Example #7
Source File: src2asciidoc.py    From qutebrowser with GNU General Public License v3.0 6 votes vote down vote up
def _format_action(action):
    """Get an invocation string/help from an argparse action."""
    if action.help == argparse.SUPPRESS:
        return None
    if not action.option_strings:
        invocation = '*{}*::'.format(_get_action_metavar(action))
    else:
        parts = []
        if action.nargs == 0:
            # Doesn't take a value, so the syntax is -s, --long
            parts += ['*{}*'.format(s) for s in action.option_strings]
        else:
            # Takes a value, so the syntax is -s ARGS or --long ARGS.
            args_string = _format_action_args(action)
            for opt in action.option_strings:
                parts.append('*{}* {}'.format(opt, args_string))
        invocation = ', '.join(parts) + '::'
    return '{}\n    {}\n'.format(invocation, action.help) 
Example #8
Source File: w_ipa.py    From westpa with MIT License 6 votes vote down vote up
def add_args(self, parser):
        self.progress.add_args(parser)
        self.data_reader.add_args(parser)
        rgroup = parser.add_argument_group('runtime options')
        rgroup.add_argument('--analysis-only', '-ao', dest='analysis_mode', action='store_true',
                             help='''Use this flag to run the analysis and return to the terminal.''')
        rgroup.add_argument('--reanalyze', '-ra', dest='reanalyze', action='store_true',
                             help='''Use this flag to delete the existing files and reanalyze.''')
        rgroup.add_argument('--ignore-hash', '-ih', dest='ignore_hash', action='store_true',
                             help='''Ignore hash and don't regenerate files.''')
        rgroup.add_argument('--debug', '-d', dest='debug_mode', action='store_true',
                             help='''Debug output largely intended for development.''')
        rgroup.add_argument('--terminal', '-t', dest='plotting', action='store_true',
                             help='''Plot output in terminal.''')
        # There is almost certainly a better way to handle this, but we'll sort that later.
        import argparse
        rgroup.add_argument('--f', '-f', dest='extra', default='blah',
                             help=argparse.SUPPRESS)
        
        parser.set_defaults(compression=True) 
Example #9
Source File: cli_parser.py    From ScoutSuite with GNU General Public License v2.0 6 votes vote down vote up
def __init__(self):
        self.parser = argparse.ArgumentParser()

        # People will still be able to use the old --provider syntax
        self.parser.add_argument("--provider",
                                 action='store_true',
                                 dest='sinkhole',
                                 help=argparse.SUPPRESS)

        self.parser.add_argument('-v', '--version',
                                 action='version',
                                 version='Scout Suite {}'.format(__version__))

        self.common_providers_args_parser = argparse.ArgumentParser(add_help=False)

        self.subparsers = self.parser.add_subparsers(title="The provider you want to run scout against",
                                                     dest="provider")

        self._init_common_args_parser()

        self._init_aws_parser()
        self._init_gcp_parser()
        self._init_azure_parser()
        self._init_aliyun_parser()
        self._init_oci_parser() 
Example #10
Source File: mx_benchmark.py    From mx with GNU General Public License v2.0 6 votes vote down vote up
def __init__(self, vm_type_name, short_vm_type_name=None, default_vm=None, known_host_registries=None):
        """

        :param str vm_type_name: full VM type name (e.g., "Java")
        :param str short_vm_type_name:
        :param default_vm: a callable which, given a config name gives a default VM name
        :param list[VmRegistry] known_host_registries: a list of known host VM registries
        """
        self.vm_type_name = vm_type_name + " VM"
        self.short_vm_type_name = short_vm_type_name if short_vm_type_name else vm_type_name.lower() + "-vm"
        assert default_vm is None or callable(default_vm)
        self.default_vm = default_vm
        assert re.compile(r"\A[a-z-]+\Z").match(self.short_vm_type_name)
        self._vms = OrderedDict()
        self._vms_suite = {}
        self._vms_priority = {}
        self._known_host_registries = known_host_registries or []
        add_parser(self.get_parser_name(), ParserEntry(
            ArgumentParser(add_help=False, usage=_mx_benchmark_usage_example + " -- <options> -- ..."),
            "\n\n{} selection flags, specified in the benchmark suite arguments:\n".format(self.vm_type_name)
        ))
        get_parser(self.get_parser_name()).add_argument("--{}".format(self.short_vm_type_name), default=None, help="{vm} to run the benchmark with.".format(vm=self.vm_type_name))
        get_parser(self.get_parser_name()).add_argument("--{}-config".format(self.short_vm_type_name), default=None, help="{vm} configuration for the selected {vm}.".format(vm=self.vm_type_name))
        # Separator to stack guest and host VM options. Though ignored, must be consumed by the parser.
        get_parser(self.get_parser_name()).add_argument('--guest', action='store_true', dest=SUPPRESS, default=None, help='Separator for --{vm}=host --guest --{vm}=guest VM configurations.'.format(vm=self.short_vm_type_name)) 
Example #11
Source File: args.py    From wifite2mod with GNU General Public License v2.0 6 votes vote down vote up
def _add_pmkid_args(self, pmkid):
        pmkid.add_argument('--pmkid',
                         action='store_true',
                         dest='use_pmkid_only',
                         help=Color.s('{O}Only{W} use {C}PMKID capture{W}, avoids other WPS & ' +
                                      'WPA attacks (default: {G}off{W})'))
        pmkid.add_argument('--no-pmkid',
                         action='store_true',
                         dest='dont_use_pmkid',
                         help=Color.s('{O}Don\'t{W} use {C}PMKID capture{W} ' +
                                      '(default: {G}off{W})'))
        # Alias
        pmkid.add_argument('-pmkid', help=argparse.SUPPRESS, action='store_true', dest='use_pmkid_only')

        pmkid.add_argument('--pmkid-timeout',
                         action='store',
                         dest='pmkid_timeout',
                         metavar='[sec]',
                         type=int,
                         help=Color.s('Time to wait for PMKID capture ' +
                                      '(default: {G}%d{W} seconds)' % self.config.pmkid_timeout)) 
Example #12
Source File: args.py    From wifite2mod with GNU General Public License v2.0 6 votes vote down vote up
def _add_command_args(self, commands):
        commands.add_argument('--cracked',
            action='store_true',
            dest='cracked',
            help=Color.s('Print previously-cracked access points'))
        commands.add_argument('-cracked', help=argparse.SUPPRESS, action='store_true',
                dest='cracked')

        commands.add_argument('--check',
            action='store',
            metavar='file',
            nargs='?',
            const='<all>',
            dest='check_handshake',
            help=Color.s('Check a {C}.cap file{W} (or all {C}hs/*.cap{W} files) ' +
                'for WPA handshakes'))
        commands.add_argument('-check', help=argparse.SUPPRESS, action='store',
                nargs='?', const='<all>', dest='check_handshake')

        commands.add_argument('--crack',
            action='store_true',
            dest='crack_handshake',
            help=Color.s('Show commands to crack a captured handshake')) 
Example #13
Source File: batch.py    From aegea with Apache License 2.0 6 votes vote down vote up
def add_command_args(parser):
    group = parser.add_mutually_exclusive_group()
    group.add_argument("--watch", action="store_true", help="Monitor submitted job, stream log until job completes")
    group.add_argument("--wait", action="store_true",
                       help="Block on job. Exit with code 0 if job succeeded, 1 if failed")
    group = parser.add_mutually_exclusive_group()
    group.add_argument("--command", nargs="+", help="Run these commands as the job (using " + BOLD("bash -c") + ")")
    group.add_argument("--execute", type=argparse.FileType("rb"), metavar="EXECUTABLE",
                       help="Read this executable file and run it as the job")
    group.add_argument("--wdl", type=argparse.FileType("rb"), metavar="WDL_WORKFLOW",
                       help="Read this WDL workflow file and run it as the job")
    parser.add_argument("--wdl-input", type=argparse.FileType("r"), metavar="WDL_INPUT_JSON", default=sys.stdin,
                        help="With --wdl, use this JSON file as the WDL job input (default: stdin)")
    parser.add_argument("--environment", nargs="+", metavar="NAME=VALUE",
                        type=lambda x: dict(zip(["name", "value"], x.split("=", 1))), default=[])
    parser.add_argument("--staging-s3-bucket", help=argparse.SUPPRESS) 
Example #14
Source File: main.py    From streamlink with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def setup_plugin_options(session, plugin):
    """Sets Streamlink plugin options."""
    pname = plugin.module
    required = OrderedDict({})
    for parg in plugin.arguments:
        if parg.options.get("help") != argparse.SUPPRESS:
            if parg.required:
                required[parg.name] = parg
            value = getattr(args, parg.namespace_dest(pname))
            session.set_plugin_option(pname, parg.dest, value)
            # if the value is set, check to see if any of the required arguments are not set
            if parg.required or value:
                try:
                    for rparg in plugin.arguments.requires(parg.name):
                        required[rparg.name] = rparg
                except RuntimeError:
                    log.error("{0} plugin has a configuration error and the arguments "
                              "cannot be parsed".format(pname))
                    break
    if required:
        for req in required.values():
            if not session.get_plugin_option(pname, req.dest):
                prompt = req.prompt or "Enter {0} {1}".format(pname, req.name)
                session.set_plugin_option(pname, req.dest,
                                          console.askpass(prompt + ": ")
                                          if req.sensitive else
                                          console.ask(prompt + ": ")) 
Example #15
Source File: asr_test_base.py    From fairseq with MIT License 5 votes vote down vote up
def get_dummy_task_and_parser():
    """
    to build a fariseq model, we need some dummy parse and task. This function
    is used to create dummy task and parser to faciliate model/criterion test

    Note: we use FbSpeechRecognitionTask as the dummy task. You may want
    to use other task by providing another function
    """
    parser = argparse.ArgumentParser(
        description="test_dummy_s2s_task", argument_default=argparse.SUPPRESS
    )
    DummyTask.add_args(parser)
    args = parser.parse_args([])
    task = DummyTask.setup_task(args)
    return task, parser 
Example #16
Source File: ext_argparse.py    From streamlink with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def add_argument(self, *args, **options):
        if not options.get("help") == argparse.SUPPRESS:
            self.arguments.append(_Argument(args, options)) 
Example #17
Source File: ext_argparse.py    From deepWordBug with Apache License 2.0 5 votes vote down vote up
def _process_commands(self, controller):
        label = controller._meta.label
        LOG.debug("processing commands for '%s' " % label +
                  "controller namespace")
        parser = self._get_parser_by_controller(controller)

        commands = controller._collect_commands()
        for command in commands:
            kwargs = self._get_command_parser_options(command)

            func_name = command['func_name']
            LOG.debug("adding command '%s' " % command['label'] +
                      "(controller=%s, func=%s)" %
                      (controller._meta.label, func_name))

            cmd_parent = self._get_parser_parent_by_controller(controller)
            command_parser = cmd_parent.add_parser(command['label'], **kwargs)

            # add an invisible dispatch option so we can figure out what to
            # call later in self._dispatch
            default_contr_func = "%s.%s" % (command['controller']._meta.label,
                                            command['func_name'])
            command_parser.add_argument(self._dispatch_option,
                                        action='store',
                                        default=default_contr_func,
                                        help=SUPPRESS,
                                        dest='__dispatch__',
                                        )

            # add additional arguments to the sub-command namespace
            LOG.debug("processing arguments for '%s' " % command['label'] +
                      "command namespace")
            for arg, kw in command['arguments']:
                LOG.debug('adding argument (args=%s, kwargs=%s)' %
                          (arg, kw))
                command_parser.add_argument(*arg, **kw) 
Example #18
Source File: micro.py    From grimoirelab-sirmordred with GNU General Public License v3.0 5 votes vote down vote up
def get_params_parser():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser(add_help=False)

    parser.add_argument('-g', '--debug', dest='debug',
                        action='store_true',
                        help=argparse.SUPPRESS)
    parser.add_argument("--raw", action='store_true', dest='raw',
                        help="Activate raw task")
    parser.add_argument("--enrich", action='store_true', dest='enrich',
                        help="Activate enrich task")
    parser.add_argument("--identities-load", action='store_true', dest='identities_load',
                        help="Activate load identities task")
    parser.add_argument("--identities-merge", action='store_true', dest='identities_merge',
                        help="Activate merge identities task")
    parser.add_argument("--panels", action='store_true', dest='panels',
                        help="Activate panels task")

    parser.add_argument("--cfg", dest='cfg_path',
                        help="Configuration file path")
    parser.add_argument("--backends", dest='backend_sections', default=[],
                        nargs='*', help="Backend sections to execute")
    parser.add_argument("--logs-dir", dest='logs_dir', default='', help='Logs Directory')

    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)

    return parser 
Example #19
Source File: bdbag_cli.py    From bdbag with Apache License 2.0 5 votes vote down vote up
def __init__(self,
                 option_strings,
                 dest=argparse.SUPPRESS,
                 default=argparse.SUPPRESS,
                 help="show program's version number and exit"):
        super(VersionAction, self).__init__(
            option_strings=option_strings,
            dest=dest,
            default=default,
            nargs=0,
            help=help) 
Example #20
Source File: parse_arguments.py    From inbac with MIT License 5 votes vote down vote up
def parse_arguments():
    parser = argparse.ArgumentParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description="""inbac - interactive batch cropper\n
Left Mouse Button                 - select part of image\n
Z                                 - save selection and go to the next picture\n
X                                 - save selection and stay on the same picture\n
C                                 - rotate current image by 90 degrees\n
Hold Left Shift or Left Ctrl      - drag selection\n
Right Arrow or Right Mouse Button - go to next picture\n
Left Arrow or Middle Mouse Button - go to previous picture\n"""
    )
    parser.add_argument("input_dir", nargs="?",
                        help="input directory (defaults to current working directory)", default=None)
    parser.add_argument("output_dir", nargs="?",
                        help="output directory (defaults to folder crops in input directory)", default=argparse.SUPPRESS)
    parser.add_argument("-a", "--aspect_ratio", type=int, nargs=2,
                        help="selection should have specified aspect ratio")
    parser.add_argument("-r", "--resize", type=int, nargs=2,
                        help="cropped image will be resized to specified width and height")
    parser.add_argument("-s", "--selection_box_color",
                        help="color of the selection box (default is black)", default="black")
    parser.add_argument("-w", "--window_size", type=int, nargs=2,
                        help="initial window size (default is 800x600)", default=[800, 600])
    parser.add_argument("-f", "--image_format",
                        help="define the croped image format")
    parser.add_argument("-q", "--image_quality", type=int,
                        help="define the croped image quality", default=100)

    args = parser.parse_args()

    return args 
Example #21
Source File: ebpcore.py    From deepWordBug with Apache License 2.0 5 votes vote down vote up
def setup(self):
        ebglobals.app = self

        hook.register('post_argument_parsing', hooks.pre_run_hook)

        platform_controllers = [
            EBPInitController,
            EBPCreateController,
            EBPDeleteController,
            EBPEventsController,
            EBPListController,
            EBPLogsController,
            EBPStatusController,
            EBPUseController,
        ]

        [controller._add_to_handler(handler) for controller in platform_controllers]

        super(EBP, self).setup()

        # Register global arguments
        self.add_arg('-v', '--verbose',
                     action='store_true', help=flag_text['base.verbose'])
        self.add_arg('--profile', help=flag_text['base.profile'])
        self.add_arg('-r', '--region', help=flag_text['base.region'])
        self.add_arg('--endpoint-url', help=SUPPRESS)
        self.add_arg('--no-verify-ssl',
                     action='store_true', help=flag_text['base.noverify'])
        self.add_arg('--debugboto',  # show debug info for botocore
                     action='store_true', help=SUPPRESS) 
Example #22
Source File: local_cli_wrapper.py    From auto-alt-text-lambda-api with MIT License 5 votes vote down vote up
def _initialize_argparsers(self):
    self._argparsers = {}
    ap = argparse.ArgumentParser(
        description="Run through, with or without debug tensor watching.",
        usage=argparse.SUPPRESS)
    ap.add_argument(
        "-t",
        "--times",
        dest="times",
        type=int,
        default=1,
        help="How many Session.run() calls to proceed with.")
    ap.add_argument(
        "-n",
        "--no_debug",
        dest="no_debug",
        action="store_true",
        help="Run through without debug tensor watching.")
    ap.add_argument(
        "-f",
        "--till_filter_pass",
        dest="till_filter_pass",
        type=str,
        default="",
        help="Run until a tensor in the graph passes the specified filter.")
    self._argparsers["run"] = ap

    ap = argparse.ArgumentParser(
        description="Invoke stepper (cont, step, breakpoint, etc.)",
        usage=argparse.SUPPRESS)
    self._argparsers["invoke_stepper"] = ap

    ap = argparse.ArgumentParser(
        description="Display information about this Session.run() call.",
        usage=argparse.SUPPRESS)
    self._argparsers["run_info"] = ap 
Example #23
Source File: test_sequence_generator.py    From fairseq with MIT License 5 votes vote down vote up
def get_dummy_task_and_parser():
    """
    to build a fariseq model, we need some dummy parse and task. This function
    is used to create dummy task and parser to faciliate model/criterion test

    Note: we use FbSpeechRecognitionTask as the dummy task. You may want
    to use other task by providing another function
    """
    parser = argparse.ArgumentParser(
        description="test_dummy_s2s_task", argument_default=argparse.SUPPRESS
    )
    DummyTask.add_args(parser)
    args = parser.parse_args([])
    task = DummyTask.setup_task(args)
    return task, parser 
Example #24
Source File: test_export.py    From fairseq with MIT License 5 votes vote down vote up
def get_dummy_task_and_parser():
    """
    Return a dummy task and argument parser, which can be used to
    create a model/criterion.
    """
    parser = argparse.ArgumentParser(
        description="test_dummy_s2s_task", argument_default=argparse.SUPPRESS
    )
    DummyTask.add_args(parser)
    args = parser.parse_args([])
    task = DummyTask.setup_task(args)
    return task, parser 
Example #25
Source File: __main__.py    From vnpy_crypto with MIT License 5 votes vote down vote up
def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
        super(PrintRuntimes, self).__init__(
            option_strings=option_strings,
            dest=dest,
            default=default,
            nargs=0,
            help=help,
        ) 
Example #26
Source File: test_lstm_jitable.py    From fairseq with MIT License 5 votes vote down vote up
def get_dummy_task_and_parser():
    """
    to build a fariseq model, we need some dummy parse and task. This function
    is used to create dummy task and parser to faciliate model/criterion test

    Note: we use FbSpeechRecognitionTask as the dummy task. You may want
    to use other task by providing another function
    """
    parser = argparse.ArgumentParser(
        description="test_dummy_s2s_task", argument_default=argparse.SUPPRESS
    )
    DummyTask.add_args(parser)
    args = parser.parse_args([])
    task = DummyTask.setup_task(args)
    return task, parser 
Example #27
Source File: helm.py    From appr with Apache License 2.0 5 votes vote down vote up
def _init_args(cls, subcmd):
        cls._add_registryhost_option(subcmd)
        cls._add_packagename_option(subcmd)
        cls._add_packageversion_option(subcmd)
        subcmd.add_argument('-t', '--media-type', default='helm', help=argparse.SUPPRESS)

        subcmd.add_argument('--dest', default=tempfile.gettempdir(),
                            help='directory used to extract resources')
        subcmd.add_argument('--tarball', action='store_true', default=True, help=argparse.SUPPRESS) 
Example #28
Source File: push.py    From appr with Apache License 2.0 5 votes vote down vote up
def _add_arguments(cls, parser):
        cls._add_registryhost_option(parser)
        cls._add_mediatype_option(parser, cls.default_media_type, required=False)
        cls._add_packageversion_option(parser)
        parser.add_argument("--ns", "--namespace", default=None, help=argparse.SUPPRESS)
        parser.add_argument("-f", "--force", action='store_true', default=False, help="force push")
        parser.add_argument("-c", "--channel", default=None, help="Set a channel")
        parser.add_argument("--version-parts", default={}, help=argparse.SUPPRESS)
        parser.add_argument("--package-parts", default={}, help=argparse.SUPPRESS)
        parser.add_argument('package', nargs='?', default=None, action=PackageSplit,
                            help="repository dest") 
Example #29
Source File: jsonnet.py    From appr with Apache License 2.0 5 votes vote down vote up
def _add_arguments(cls, parser):
        parser.add_argument("--namespace", help="kubernetes namespace", default='default')
        parser.add_argument("-x", "--variables", help="variables", default={},
                            action=LoadVariables)
        parser.add_argument('filepath', nargs=1, help="Fetch package from the registry")
        parser.add_argument('--raw', action="store_true", default=False, help=argparse.SUPPRESS)
        parser.add_argument('-J', '--lib-dir', action='append', default=[],
                            help="Specify an additional library search dir") 
Example #30
Source File: command_base.py    From appr with Apache License 2.0 5 votes vote down vote up
def _add_registryhost_option(cls, parser):
        parser.add_argument("-H", "--registry-host", default=None, help=argparse.SUPPRESS)
        parser.add_argument("-k", "--insecure", action="store_true", default=False,
                            help="turn off verification of the https certificate")
        parser.add_argument("--cacert", default=None,
                            help="CA certificate to verify peer against (SSL)")