def check_gas(self):
        # have "id",
        # have at least one file
        # the file should have type, id, name items.
        with open(self.source_file, "rb") as f:
            jsons = json.loads(f.read())

            if_ok = False

            if not isinstance(jsons, dict):
                return False

            if not self.gas_new:
                assert(jsons.get("id"))
                self.file_id = jsons.get("id")

            if(0 > len(jsons["files"])):
                for j in jsons["files"]:
                    if j["type"] and j["name"]:
                        if_ok = True
                    else:
                        return False

        return if_ok
dataset/ETHPy150Open tienfuc/gdcmdtools/gdcmdtools/put.py/GDPut.check_gas/swapped operands of `>`