

def flatten_actual_args(args):
    if isinstance(args, (list, tuple)):
        return args
    assert isinstance(args, ActualArgs), ('Unexpected args: %s' % (args,))
    assert (len(args.keywords) == 0)
    result = list(args.positional)
    if args.starargs:
        result.extend(tuple_elts(args.starargs))
    return result

dataset/ETHPy150Open iskandr/parakeet/parakeet/type_inference/linearize_args.py flatten_actual_args/original