Remove redundant parentheses

This commit is contained in:
Hugo 2017-11-28 10:32:55 +02:00 committed by Daniele Varrazzo
parent 08b479bc10
commit 283de27098
5 changed files with 7 additions and 7 deletions

View File

@ -194,7 +194,7 @@ def _get_json_oids(conn_or_curs, name='json'):
r = curs.fetchone()
# revert the status of the connection as before the command
if (conn_status != STATUS_IN_TRANSACTION and not conn.autocommit):
if conn_status != STATUS_IN_TRANSACTION and not conn.autocommit:
conn.rollback()
if not r:

View File

@ -280,7 +280,7 @@ class RealDictRow(dict):
return dict.__setitem__(self, name, value)
def __getstate__(self):
return (self.copy(), self._column_mapping[:])
return self.copy(), self._column_mapping[:]
def __setstate__(self, data):
self.update(data[0])

View File

@ -75,7 +75,7 @@ class FixedOffsetTimezone(datetime.tzinfo):
def __getinitargs__(self):
offset_mins = self._offset.seconds // 60 + self._offset.days * 24 * 60
return (offset_mins, self._name)
return offset_mins, self._name
def utcoffset(self, dt):
return self._offset

View File

@ -43,7 +43,7 @@ def main():
dump(i, opt)
f1 = open('debug-%02d.txt' % (opt.nruns - 1)).readlines()
f2 = open('debug-%02d.txt' % (opt.nruns)).readlines()
f2 = open('debug-%02d.txt' % opt.nruns).readlines()
for line in difflib.unified_diff(f1, f2,
"run %d" % (opt.nruns - 1), "run %d" % opt.nruns):
sys.stdout.write(line)
@ -52,7 +52,7 @@ def main():
if opt.objs:
f1 = open('objs-%02d.txt' % (opt.nruns - 1)).readlines()
f2 = open('objs-%02d.txt' % (opt.nruns)).readlines()
f2 = open('objs-%02d.txt' % opt.nruns).readlines()
for line in difflib.unified_diff(f1, f2,
"run %d" % (opt.nruns - 1), "run %d" % opt.nruns):
sys.stdout.write(line)

View File

@ -463,9 +463,9 @@ def _has_lo64(conn):
% conn.server_version)
if 'lo64' not in psycopg2.__version__:
return (False, "this psycopg build doesn't support the lo64 API")
return False, "this psycopg build doesn't support the lo64 API"
return (True, "this server and build support the lo64 API")
return True, "this server and build support the lo64 API"
def skip_if_no_lo64(f):