replace "execute" context manager with contextlib.closing
clutchski opened this issue · comments
Matt Perpick commented
for example,
with execute(self.conn, sql, [VERSION_TABLE]) as cursor:
return bool(cursor.fetchall())
is the same as:
with contextlib.closing(self.conn.execute(sql, [VERSION_TABLE]) as cursor:
return bool(cursor.fetchall())