Commits

Thiago Avelino committed f6ad0fc

E231 missing whitespace after ',', fix pep8

  • Participants
  • Parent commits 112bb7a

Comments (0)

Files changed (1)

CodernityDB/indexcreator.py

         self.stage = 0
         self.logic = ['and', 'or', 'in']
         self.logic2 = ['&', '|']
-        self.allowed_props = {'TreeBasedIndex': ['type','name','key_format','node_capacity','pointer_format','meta_format'],
-                              'HashIndex': ['type','name','key_format','hash_lim','entry_line_format']}
+        self.allowed_props = {'TreeBasedIndex': ['type', 'name', 'key_format', 'node_capacity',
+                                                 'pointer_format', 'meta_format'],
+                              'HashIndex': ['type', 'name', 'key_format', 'hash_lim', 'entry_line_format']}
         self.funcs = {'md5': (['md5'], ['.digest()']),
                       'len': (['len'], []),
                       'str': (['str'], []),
         self.is_one_arg_enough = False
         self.to_import = []
         self.funcs_stack = []
-        self.last_line = [-1,-1,-1]
+        self.last_line = [-1, -1, -1]
         self.props_set = []
 
         self.tokens = ['# %s\n' % self.name, 'class %s(' % self.name, '):\n', '   def __init__(self, *args, **kwargs):        ']
         if self.index_type in self.allowed_props:
             for i in self.props_set:
                 if i not in self.allowed_props[self.index_type]:
-                    raise IndexCreatorValueException("Properity %s is not allowed for index type: %s"%(i,self.index_type))
+                    raise IndexCreatorValueException("Properity %s is not allowed for index type: %s"%(i, self.index_type))
 
         #print " ".join(self.tokens)
         return " ".join(self.tokens)
 
         if d[0][0] == token.NAME or d[0][0] == token.STRING:
             if d[0][1] in self.props_set:
-                raise IndexCreatorValueException("Properity %s is set more than once" % d[0][1],self.cnt_line_nr(d[0][4],0))
+                raise IndexCreatorValueException("Properity %s is set more than once" % d[0][1], self.cnt_line_nr(d[0][4], 0))
             self.props_set += [d[0][1]]
             if d[0][1] == "type" or d[0][1] == "name":
                 t, tk, _, _, line = d[2]
 
     def generate_func(self, t, tk, pos_start, pos_end, line, hdata, stage):
         if self.last_line[stage] != -1 and pos_start[0] > self.last_line[stage] and line != '':
-            raise IndexCreatorFunctionException("This line will never be executed!",self.cnt_line_nr(line,stage))
+            raise IndexCreatorFunctionException("This line will never be executed!", self.cnt_line_nr(line, stage))
         if t == 0:
             return