

def process(args):
    conduit = phlsys_makeconduit.make_conduit(args.uri, args.user, args.cert, args.act_as_user)
    user_phids = phlcon_user.UserPhidCache(conduit)
    user_phids.add_hint_list(_combine_lists_if_not_none(args.owners, args.ccs))
    authors = [user_phids.get_phid(user) for user in args.authors]
    owners = [user_phids.get_phid(user) for user in args.owners]
    ccs = [user_phids.get_phid(user) for user in args.ccs]
    projects = None
    if args.projects:
        project_to_phid = phlcon_project.make_project_to_phid_dict(conduit)
        projects = [project_to_phid[p] for p in owners.projects]
    filters = phlcon_maniphest.STATUS_FILTERS
    status = (filters[args.status] if (args.status is not None) else None)
    orderings = phlcon_maniphest.ORDERS
    order = (orderings[args.order] if (args.order is not None) else None)
    results = phlcon_maniphest.query(conduit, ids=args.ids, authors=authors, owners=owners, ccs=ccs, projects=projects, status=status, limit=args.max_results, offset=args.offset_results, order=order, text=args.text)
    results = [dict(r.__dict__) for r in results]
    for r in results:
        if (r['statusName'] is None):
            r['statusName'] = phlcon_maniphest.STATUSES[int(r['status'])]
    output_format = '{id} / {statusName} / {priority} / {title}'
    if args.format_ids:
        output_format = '{id}'
    elif (args.format_string is not None):
        output_format = args.format_string
    if args.format_python:
        pprint.pprint(results)
    elif args.format_json:
        print(json.dumps(results, sort_keys=True, indent=2))
    else:
        for r in results:
            print(output_format.format(**r))

dataset/ETHPy150Open bloomberg/phabricator-tools/py/aon/aoncmd_taskquery.py process/VarMisuse@139/214 `args`->`owners`