Example #1
0
 def add_arguments(self, parser: argparse.ArgumentParser) -> None:
     parser.add_argument(
         "-d",
         "--dev",
         default=False,
         action="store_true",
         help="import packages into dev dependencies",
     )
     parser.add_argument(
         "-s",
         "--section",
         dest="group",
         help="(DEPRECATED) Alias of `-G/--group`",
         type=deprecated(
             "`-s/--section` is deprecated in favor of `-G/--groups` "
             "and will be removed in the next minor release."),
     )
     parser.add_argument(
         "-G",
         "--group",
         help="Specify the target dependency group to import into")
     parser.add_argument(
         "-f",
         "--format",
         choices=FORMATS.keys(),
         help="Specify the file format explicitly",
     )
     parser.add_argument("filename", help="The file name")
     parser.set_defaults(search_parent=False)
Example #2
0
 def add_arguments(self, parser: argparse.ArgumentParser) -> None:
     parser.add_argument(
         "-f",
         "--format",
         choices=FORMATS.keys(),
         default="requirements",
         help="Specify the export file format",
     )
     groups_group.add_to_parser(parser)
     parser.add_argument(
         "--without-hashes",
         dest="hashes",
         action="store_false",
         default=True,
         help="Don't include artifact hashes",
     )
     parser.add_argument(
         "-o",
         "--output",
         help="Write output to the given file, or print to stdout if not given",
     )
     parser.add_argument(
         "--pyproject",
         action="store_true",
         help="Read the list of packages from pyproject.toml",
     )
Example #3
0
 def add_arguments(self, parser: argparse.ArgumentParser) -> None:
     parser.add_argument(
         "-f",
         "--format",
         choices=FORMATS.keys(),
         help="Specify the file format explicitly",
     )
     parser.add_argument("filename", help="The file name")
     parser.set_defaults(project=self.project_class("."))
Example #4
0
 def add_arguments(self, parser: argparse.ArgumentParser) -> None:
     parser.add_argument(
         "-d",
         "--dev",
         default=False,
         action="store_true",
         help="import packages into dev dependencies",
     )
     parser.add_argument("-s",
                         "--section",
                         help="Specify target section to import into")
     parser.add_argument(
         "-f",
         "--format",
         choices=FORMATS.keys(),
         help="Specify the file format explicitly",
     )
     parser.add_argument("filename", help="The file name")
     parser.set_defaults(search_parent=False)