_add_common_args ======================================= .. py:function:: petpal.cli.cli_preproc._add_common_args(parser: argparse.ArgumentParser) -> None Adds common arguments ('--input-img', '--out-img') to a provided ArgumentParser object. This function modifies the passed ArgumentParser object by adding two arguments commonly used for the command line scripts. It uses the add_argument method of the ArgumentParser class. After running this function, the parser will be able to accept and parse these additional arguments from the command line when run. .. note:: This function modifies the passed `parser` object in-place and does not return anything. :param parser: The argument parser object to which the arguments are added. :type parser: argparse.ArgumentParser :raises argparse.ArgumentError: If a duplicate argument tries to be added. Side Effects: Modifies the ArgumentParser object by adding new arguments. .. rubric:: Example .. code-block:: python parser = argparse.ArgumentParser() _add_common_args(parser) args = parser.parse_args(['--pet', 'pet_file', '--out-dir', './', '--prefix', 'prefix']) print(args.pet) print(args.out_dir) print(args.prefix)