summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2017-11-28 10:32:55 +0200
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-11-28 16:06:52 +0000
commit283de270987dbd17a3cf2285da60722d4b5cc001 (patch)
tree3e5d55fb26a4abedeccf4305c0003339cfdba2d7
parent08b479bc105af9ee50ce3d67d7661bd85fc6437f (diff)
downloadpsycopg2-283de270987dbd17a3cf2285da60722d4b5cc001.tar.gz
Remove redundant parentheses
-rw-r--r--lib/_json.py2
-rw-r--r--lib/extras.py2
-rw-r--r--lib/tz.py2
-rwxr-xr-xscripts/refcounter.py4
-rwxr-xr-xtests/test_lobject.py4
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/_json.py b/lib/_json.py
index 30910eb..71c2b76 100644
--- a/lib/_json.py
+++ b/lib/_json.py
@@ -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:
diff --git a/lib/extras.py b/lib/extras.py
index 67e50b2..3308f78 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -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])
diff --git a/lib/tz.py b/lib/tz.py
index 92a1604..d593175 100644
--- a/lib/tz.py
+++ b/lib/tz.py
@@ -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
diff --git a/scripts/refcounter.py b/scripts/refcounter.py
index 9e900cf..305dd1b 100755
--- a/scripts/refcounter.py
+++ b/scripts/refcounter.py
@@ -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)
diff --git a/tests/test_lobject.py b/tests/test_lobject.py
index cf8a556..8eafabc 100755
--- a/tests/test_lobject.py
+++ b/tests/test_lobject.py
@@ -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):