11import itertools
22import time
3- import six
43
54from .document import Document
65from .result import Result
@@ -308,9 +307,8 @@ def load_document(self, id):
308307 Load a single document by id
309308 """
310309 fields = self .client .hgetall (id )
311- if six .PY3 :
312- f2 = {to_string (k ): to_string (v ) for k , v in fields .items ()}
313- fields = f2
310+ f2 = {to_string (k ): to_string (v ) for k , v in fields .items ()}
311+ fields = f2
314312
315313 try :
316314 del fields ["id" ]
@@ -337,13 +335,13 @@ def info(self):
337335 """
338336
339337 res = self .client .execute_command (INFO_CMD , self .index_name )
340- it = six . moves . map (to_string , res )
341- return dict (six . moves . zip (it , it ))
338+ it = map (to_string , res )
339+ return dict (zip (it , it ))
342340
343341 def _mk_query_args (self , query ):
344342 args = [self .index_name ]
345343
346- if isinstance (query , six . string_types ):
344+ if isinstance (query , str ):
347345 # convert the query from a text to a query object
348346 query = Query (query )
349347 if not isinstance (query , Query ):
@@ -448,7 +446,7 @@ def spellcheck(self, query, distance=None, include=None, exclude=None):
448446 return corrections
449447
450448 for _correction in raw :
451- if isinstance (_correction , six . integer_types ) and _correction == 0 :
449+ if isinstance (_correction , int ) and _correction == 0 :
452450 continue
453451
454452 if len (_correction ) != 3 :
0 commit comments