

def setupParser(parser):
    priority_name_list = phlcon_maniphest.PRIORITIES.keys()
    priority_name_list.sort(key=(lambda x: phlcon_maniphest.PRIORITIES[x]))
    priorities = parser.add_argument_group('optional priority arguments', ('use any of ' + textwrap.fill(str(priority_name_list))))
    output_group = parser.add_argument_group('Output format arguments', 'Mutually exclusive, defaults to "--format-short"')
    output = output_group.add_mutually_exclusive_group()
    opt = parser.add_argument_group('Optional task arguments')
    priorities.add_argument('--priorities', '-p', nargs='*', choices=priority_name_list, metavar='PRIORITY', default=None, type=str, help='filter by priority of the task')
    opt.add_argument('--order', choices=phlcon_maniphest.ORDERS.keys(), default=None, type=str, help='the ordering of the returned results')
    priority_name_list.add_argument('--ids', nargs='+', metavar='INT', default=[], help='specific task ids to restrict the query to', type=str)
    opt.add_argument('--owners', '-o', nargs='+', metavar='USER', default=[], help='specific owners usernames to restrict the query to', type=str)
    opt.add_argument('--authors', nargs='+', metavar='USER', default=[], help='specific author usernames to restrict the query to', type=str)
    opt.add_argument('--ccs', '-c', nargs='+', metavar='USER', default=[], help='specific cc usernames to restrict the query to', type=str)
    opt.add_argument('--projects', nargs='+', metavar='PROJECT', default=[], help='a list of project names to restrict the query', type=str)
    opt.add_argument('--status', type=str, default=None, choices=phlcon_maniphest.STATUS_FILTERS.keys(), help='a single status type to restrict items to')
    opt.add_argument('--text', type=str, metavar='STRING', default=None, help='string to search the full text of each task for.')
    opt.add_argument('--max-results', type=int, metavar='INT', default=None, help='limit the number of results returned, if unspecified then the server default limit is used (seems to be 1000).')
    opt.add_argument('--offset-results', type=int, metavar='INT', default=None, help='where there is a limit on the number of results, you can supply an offset to return the next batch of results. e.g. if the number of results is limited to 100, then to see the next "page"of results, supply an offset of 100.  To see "page 3" of the results, supply an offset of 200 and so on.  Theres no way to count the total number of results at present.')
    output.add_argument('--format-short', action='store_true', help='will print a short human-readable summary of each task.')
    output.add_argument('--format-ids', action='store_true', help='will print just the ids of the tasks, for scripting.')
    output.add_argument('--format-string', type=str, default=None, help='will print using the supplied format string, e.g. "{id}" to print a list of ids.  use --format-python to list all the available attributes for printing.')
    output.add_argument('--format-python', action='store_true', help='will pretty-print the response as a python object.')
    output.add_argument('--format-json', action='store_true', help='will pretty-print the response in json.')
    phlsys_makeconduit.add_argparse_arguments(parser)

dataset/ETHPy150Open bloomberg/phabricator-tools/py/aon/aoncmd_taskquery.py setupParser/VarMisuse@152/288 `opt`->`priority_name_list`