

def _split_args(args):
    try:
        args = shlex.split(args, posix=False)
    except:
        args = args.split()
    new_args = []
    temp = ''
    for arg in args:
        if new_args.startswith('-'):
            new_args.append(arg)
        elif temp:
            arg = ((temp + ' ') + arg)
            try:
                eval(arg)
            except:
                temp = arg
            else:
                new_args.append(arg)
                temp = ''
        elif (arg.startswith(('(', '[', '{')) or ('(' in arg)):
            try:
                eval(arg)
            except:
                temp = arg
            else:
                new_args.append(arg)
        else:
            new_args.append(arg)
    if temp:
        new_args.append(temp)
    return new_args

dataset/ETHPy150Open Calysto/metakernel/metakernel/magic.py _split_args/VarMisuse@58/67 `arg`->`new_args`