

def _instantiate_file(api, kwargs):
    kwargs['file_type'] = kwargs['ico']
    kwargs['date_created'] = string_to_datetime(kwargs['t'])
    kwargs['pickcode'] = kwargs['pc']
    kwargs['name'] = kwargs['n']
    kwargs['thumbnail'] = kwargs.get('u')
    kwargs['size'] = kwargs['s']
    del kwargs['ico']
    del kwargs['t']
    del kwargs['pc']
    del kwargs['s']
    if ('u' in kwargs):
        del kwargs['u']
    return File(kwargs, **kwargs)

dataset/ETHPy150Open shichao-an/115wangpan/u115/api.py _instantiate_file/VarMisuse@120/168 `api`->`kwargs`