Skip to content

Commit 9b712c1

Browse files
committed
flake8: unused imports / pyth 3.5 compatibility added
1 parent 61c94ed commit 9b712c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rejson/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from sys import stdout
1+
import six
22
import json
3-
from redis import StrictRedis, exceptions
3+
from redis import StrictRedis
44
from redis.client import BasePipeline
55
from redis._compat import (long, nativestr)
66
from .path import Path
@@ -14,7 +14,7 @@ def str_path(p):
1414

1515
def float_or_long(n):
1616
"Return a number from a Redis reply"
17-
if isinstance(n, str):
17+
if isinstance(n, six.string_types):
1818
return float(n)
1919
else:
2020
return long(n)
@@ -90,7 +90,7 @@ def __init__(self, encoder=None, decoder=None, *args, **kwargs):
9090
'JSON.ARRTRIM': long_or_none,
9191
'JSON.OBJLEN': long_or_none,
9292
}
93-
for k, v in MODULE_CALLBACKS.iteritems():
93+
for k, v in six.iteritems(MODULE_CALLBACKS):
9494
self.set_response_callback(k, v)
9595

9696
def setEncoder(self, encoder):
File renamed without changes.

0 commit comments

Comments
 (0)