standardize on nargs="*"

pull/1976/head
Jimmy Brisson 2016-06-23 16:14:18 -05:00
parent 3276854f49
commit 7e5deaa7d0
6 changed files with 11 additions and 11 deletions

View File

@ -44,7 +44,7 @@ if __name__ == '__main__':
parser = get_default_options_parser()
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
default=None, help="The source (input) directory", action="append")
default=None, help="The source (input) directory", nargs="*")
parser.add_argument("--build", dest="build_dir", type=argparse_filestring_type,
default=None, help="The build (output) directory")
@ -107,7 +107,7 @@ if __name__ == '__main__':
help="Compiles 'cpputest' unit test library (library should be on the same directory level as mbed repository)")
parser.add_argument("-D",
action="append",
nargs="*",
dest="macros",
help="Add a macro definition")

View File

@ -38,8 +38,8 @@ if __name__ == '__main__':
# Parse Options
parser = get_default_options_parser(add_clean=False, add_options=False)
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
default=[], help="The source (input) directory", action="append")
parser.add_argument("--prefix", dest="prefix", action="append",
default=[], help="The source (input) directory", nargs="*")
parser.add_argument("--prefix", dest="prefix", nargs="*",
default=[], help="Restrict listing to parameters that have this prefix")
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose",
default=False, help="Verbose diagnostic output")

View File

@ -79,7 +79,7 @@ if __name__ == '__main__':
help="Silent diagnostic output (no copy, compile notification)")
parser.add_argument("-D",
action="append",
nargs="*",
dest="macros",
help="Add a macro definition")
@ -106,7 +106,7 @@ if __name__ == '__main__':
parser.add_argument("--dep", dest="dependencies",
default=None, help="Dependencies")
group.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
default=None, help="The source (input) directory", action="append")
default=None, help="The source (input) directory", nargs="*")
parser.add_argument("--duration", type=int, dest="duration",
default=None, help="Duration of the test")
parser.add_argument("--build", dest="build_dir",

View File

@ -43,7 +43,7 @@ def get_default_options_parser(add_clean=True, add_options=True):
help="clean the build directory")
if add_options:
parser.add_argument("-o", "--options", action="append",
parser.add_argument("-o", "--options", nargs="*",
help='Add a build argument ("save-asm": save the asm generated by the compiler, "debug-info": generate debugging information, "analyze": run Goanna static code analyzer")',
type=argparse_lowercase_hyphen_type(['save-asm', 'debug-info', 'analyze'], "build option"))

View File

@ -90,7 +90,7 @@ if __name__ == '__main__':
help="The source (input) directory")
parser.add_argument("-D",
action="append",
nargs="*",
dest="macros",
help="Add a macro definition")

View File

@ -40,10 +40,10 @@ if __name__ == '__main__':
parser = get_default_options_parser()
parser.add_argument("-D",
action="append",
nargs="*",
dest="macros",
help="Add a macro definition")
parser.add_argument("-j", "--jobs",
type=int,
dest="jobs",
@ -52,7 +52,7 @@ if __name__ == '__main__':
parser.add_argument("--source", dest="source_dir",
type=argparse_filestring_type,
default=None, help="The source (input) directory (for sources other than tests). Defaults to current directory.", action="append")
default=None, help="The source (input) directory (for sources other than tests). Defaults to current directory.", nargs="*")
parser.add_argument("--build", dest="build_dir",
default=None, help="The build (output) directory")