[autopep8] E231 - Add missing whitespace
authorNoe Gaumont <ngaumont@logilab.fr>
Fri, 21 Jun 2019 11:19:05 +0200
changeset 59 e777ae94fb53
parent 58 cb72a0cbc2b7
child 60 4f9b0537209b
[autopep8] E231 - Add missing whitespace
cubicweb_treeview/views/formwidgets.py
cubicweb_treeview/views/treeview.py
--- a/cubicweb_treeview/views/formwidgets.py	Fri Jun 21 11:19:04 2019 +0200
+++ b/cubicweb_treeview/views/formwidgets.py	Fri Jun 21 11:19:05 2019 +0200
@@ -95,7 +95,7 @@
             entities = [form._cw.entity_from_eid(i[1]) for i in vocab]
             eids = ', '.join(str(e.eid) for e in entities
                              if e.cw_adapt_to('ITree') and e.cw_adapt_to('ITree').is_root())
-            return form._cw.execute('Any X WHERE X eid IN (%(e)s)' % {'e':eids})
+            return form._cw.execute('Any X WHERE X eid IN (%(e)s)' % {'e': eids})
         return None
 
     def render_treeform(self, form, treerset, tree_uid, related):
@@ -114,7 +114,7 @@
         initial_values = self.values(form, field)
         if initial_values:
             related = form._cw.execute('Any K WHERE K eid IN (%(eid)s)' %
-                                       {'eid':','.join([str(v) for v in initial_values])})
+                                       {'eid': ','.join([str(v) for v in initial_values])})
         else:
             related = form.edited_entity.related(field.name, field.role)
         if related:
@@ -127,5 +127,5 @@
         for keyword in related:
             input = tags.input(id=name, name=name, value=keyword.eid, type='hidden')
             yield tags.div(u'<a href="javascript:$.noop()" onclick="$(this).parent().remove()">[x]</a>'
-                           u'%(input)s %(title)s' % {'input':input,
+                           u'%(input)s %(title)s' % {'input': input,
                                                      'title': xml_escape(keyword.dc_title())})
--- a/cubicweb_treeview/views/treeview.py	Fri Jun 21 11:19:04 2019 +0200
+++ b/cubicweb_treeview/views/treeview.py	Fri Jun 21 11:19:05 2019 +0200
@@ -169,7 +169,7 @@
 
     def cell_call(self, row, col, tree_uid, multiple,
                   leavesonly, related, required, level):
-        entity = self.cw_rset.get_entity(row,col)
+        entity = self.cw_rset.get_entity(row, col)
         entity_name = xml_escape(entity.dc_title())
         itree = entity.cw_adapt_to('ITree')
         is_leaf = itree.is_editable_leaf()
@@ -180,7 +180,7 @@
             elif not leavesonly or is_leaf:
                 self.w(u'<input type="checkbox" name="selitems" value="%(eid)s" '
                        u'%(sel)s id="treeitem_%(eid)s"/>&nbsp;' \
-                       % {'eid':entity.eid,'sel':entity.eid
+                       % {'eid': entity.eid, 'sel': entity.eid
                           in related and u'checked="checked"' or u''})
                 self.w(u'<span class="hidden">%s</span>' % entity_name)
                 self.w(u'<a href="javascript:$.noop()" onclick="$(\'#treeitem_%s\').click()" class="selectable">'