Commit 02378b4f authored by Noé Gaumont's avatar Noé Gaumont 🐙
Browse files

[autopep8] E231 - Add missing whitespace

parent cb72a0cbc2b7
......@@ -95,7 +95,7 @@ class TreeViewWidget(fwdgs.FieldWidget):
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 @@ class TreeViewWidget(fwdgs.FieldWidget):
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])})
related = form.edited_entity.related(, field.role)
if related:
......@@ -127,5 +127,5 @@ class TreeViewWidget(fwdgs.FieldWidget):
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())})
......@@ -169,7 +169,7 @@ class TVTreeviewOneLineEditView(baseviews.InContextView):
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 @@ class TVTreeviewOneLineEditView(baseviews.InContextView):
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">'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment