def configure_parser(sub_parsers): p = sub_parsers.add_parser( "list", description=descr, help=descr, formatter_class=RawDescriptionHelpFormatter, epilog=examples, add_help=False, ) common.add_parser_help(p) common.add_parser_prefix(p) common.add_parser_json(p) common.add_parser_show_channel_urls(p) p.add_argument( "-c", "--canonical", action="store_true", help="Output canonical names of packages only. Implies --no-pip. " ) p.add_argument("-f", "--full-name", action="store_true", help="Only search for full names, i.e., ^<regex>$.") p.add_argument( "-e", "--export", action="store_true", help="""Output requirement string only (output may be used by conda create --file).""", ) p.add_argument("-r", "--revisions", action="store_true", help="List the revision history and exit.") p.add_argument( "--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages." ) p.add_argument("regex", action="store", nargs="?", help="List only packages matching this regular expression.") p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) p.add_argument( "--force", action="store_true", help= "Forces removal of a package without removing packages that depend on it. " "Using this option will usually leave your environment in a broken and " "inconsistent state.", ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) # Putting this one first makes it the default common.add_parser_no_use_index_cache(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) common.add_parser_pscheck(p) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) p.add_argument( "--force", action="store_true", help="Forces removal of a package without removing packages that depend on it. " "Using this option will usually leave your environment in a broken and " "inconsistent state.", ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) # Putting this one first makes it the default common.add_parser_no_use_index_cache(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) common.add_parser_pscheck(p) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'list', description=descr, help=descr, formatter_class=RawDescriptionHelpFormatter, epilog=examples, add_help=False, ) common.add_parser_help(p) common.add_parser_prefix(p) common.add_parser_json(p) common.add_parser_show_channel_urls(p) p.add_argument( '-c', "--canonical", action="store_true", help="Output canonical names of packages only. Implies --no-pip. ", ) p.add_argument( '-f', "--full-name", action="store_true", help="Only search for full names, i.e., ^<regex>$.", ) p.add_argument( "--explicit", action="store_true", help="List explicitly all installed conda packaged with URL " "(output may be used by conda create --file).", ) p.add_argument( '-e', "--export", action="store_true", help="Output requirement string only (output may be used by " " conda create --file).", ) p.add_argument( '-r', "--revisions", action="store_true", help="List the revision history and exit.", ) p.add_argument("--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages.") p.add_argument( 'regex', action="store", nargs="?", help="List only packages matching this regular expression.", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) p.add_argument( "--force-pscheck", action="store_true", help=("Force removal (when package process is running) (deprecated)" if config.platform == 'win' else argparse.SUPPRESS) ) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) p.add_argument( "--force-pscheck", action="store_true", help=("Force removal (when package process is running) (deprecated)" if config.platform == 'win' else argparse.SUPPRESS)) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def __init__(self, *args, **kwargs): if not kwargs.get('formatter_class'): kwargs['formatter_class'] = argparse.RawDescriptionHelpFormatter if 'add_help' not in kwargs: add_custom_help = True kwargs['add_help'] = False else: add_custom_help = False super(ArgumentParser, self).__init__(*args, **kwargs) if add_custom_help: common.add_parser_help(self) if self.description: self.description += "\n\nOptions:\n"
formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) ======= p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name, help=help % name, epilog=example % name, ) >>>>>>> conda/feature/instruction-arguments common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", <<<<<<< HEAD