Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _parse_arguments():
"""Parses command line arguments.
Returns:
A Namespace of parsed arguments.
"""
# Handle version flag and exit if it was passed.
param_util.handle_version_flag()
parser = provider_base.create_parser(sys.argv[0])
parser.add_argument(
'--version', '-v', default=False, help='Print the dsub version and exit.')
parser.add_argument(
'--jobs',
'-j',
nargs='*',
help='A list of jobs IDs on which to check status')
parser.add_argument(
'--names',
'-n',
nargs='*',
help='A list of job names on which to check status')
parser.add_argument(
'--tasks',
def _parse_arguments():
"""Parses command line arguments.
Returns:
A Namespace of parsed arguments.
"""
# Handle version flag and exit if it was passed.
param_util.handle_version_flag()
parser = provider_base.create_parser(sys.argv[0])
parser.add_argument(
'--version', '-v', default=False, help='Print the dsub version and exit.')
parser.add_argument(
'--jobs',
'-j',
required=True,
nargs='*',
help='List of job-ids to delete. Use "*" to delete all running jobs.')
parser.add_argument(
'--tasks',
'-t',
nargs='*',
help='List of tasks in an array job to delete.')
parser.add_argument(
def _parse_arguments(prog, argv):
"""Parses command line arguments.
Args:
prog: The path of the program (dsub.py) or an alternate program name to
display in usage.
argv: The list of program arguments to parse.
Returns:
A Namespace of parsed arguments.
"""
# Handle version flag and exit if it was passed.
param_util.handle_version_flag()
parser = provider_base.create_parser(prog)
# Add dsub core job submission arguments
parser.add_argument(
'--version', '-v', default=False, help='Print the dsub version and exit.')
parser.add_argument(
'--unique-job-id',
default=False,
action='store_true',
help="""Experimental: create a unique 32 character UUID for the dsub
job-id using https://docs.python.org/3/library/uuid.html.""")
parser.add_argument(
'--name',
help="""Name for pipeline. Defaults to the script name or
first token of the --command if specified.""")
parser.add_argument(