

def save(self, data, indent=4):
    self.fdir = os.path.dirname(self.fpath)
    if (not os.path.isdir(self.fdir)):
        os.makedirs(f.fdir)
    f = codecs.open(self.fpath, 'w+', encoding=self.encoding)
    f.write(json.dumps(data, ensure_ascii=False, indent=indent))
    f.close()

dataset/ETHPy150Open randy3k/UnitTesting/unittesting/utils/json_file.py JsonFile.save/VarMisuse@52/56 `self`->`f`