cleanup
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 25 Sep 2009 11:57:35 +0200
changeset 3485 e867ae952fc0
parent 3484 52e6c8d62ac6
child 3490 1acc89d4a512
cleanup
rtags.py
web/views/autoform.py
web/views/editforms.py
--- a/rtags.py	Fri Sep 25 11:57:31 2009 +0200
+++ b/rtags.py	Fri Sep 25 11:57:35 2009 +0200
@@ -100,10 +100,6 @@
         self.tag_relation(key, *args, **kwargs)
 
     def tag_relation(self, key, tag):
-        #if isinstance(key, basestring):
-        #    stype, rtype, otype = key.split()
-        #else:
-        stype, rtype, otype, tagged = [str(k) for k in key]
         if self._allowed_values is not None:
             assert tag in self._allowed_values, \
                    '%r is not an allowed tag (should be in %s)' % (
--- a/web/views/autoform.py	Fri Sep 25 11:57:31 2009 +0200
+++ b/web/views/autoform.py	Fri Sep 25 11:57:35 2009 +0200
@@ -131,7 +131,8 @@
             targettype = targettypes[0]
             if self.should_inline_relation_form(rschema, targettype, role):
                 entity = self._cw.vreg['etypes'].etype_class(targettype)(self._cw)
-                subform = self._cw.vreg['forms'].select('edition', self._cw, entity=entity)
+                subform = self._cw.vreg['forms'].select('edition', self._cw,
+                                                        entity=entity)
                 if subform.form_needs_multipart:
                     return True
         return False
--- a/web/views/editforms.py	Fri Sep 25 11:57:31 2009 +0200
+++ b/web/views/editforms.py	Fri Sep 25 11:57:35 2009 +0200
@@ -63,8 +63,9 @@
             if entity.eid in done:
                 continue
             done.add(entity.eid)
-            subform = self._cw.vreg['forms'].select('base', self._cw, entity=entity,
-                                                mainform=False)
+            subform = self._cw.vreg['forms'].select('base', self._cw,
+                                                    entity=entity,
+                                                    mainform=False)
             self.form_add_subform(subform)
 
 
@@ -84,11 +85,13 @@
           % _('this action is not reversible!'))
         # XXX above message should have style of a warning
         w(u'<h4>%s</h4>\n' % _('Do you want to delete the following element(s) ?'))
-        form = self._cw.vreg['forms'].select(self.__regid__, req, rset=self.cw_rset,
-                                         onsubmit=onsubmit)
+        form = self._cw.vreg['forms'].select(self.__regid__, req,
+                                             rset=self.cw_rset,
+                                             onsubmit=onsubmit)
         w(u'<ul>\n')
         for entity in self.cw_rset.entities():
-            # don't use outofcontext view or any other that may contain inline edition form
+            # don't use outofcontext view or any other that may contain inline
+            # edition form
             w(u'<li>%s</li>' % tags.a(entity.view('textoutofcontext'),
                                       href=entity.absolute_url()))
         w(u'</ul>\n')
@@ -120,7 +123,8 @@
         return self._one_rvid
 
     def _build_landing_zone(self, lzone):
-        return lzone or self._defaultlandingzone % {'msg' : xml_escape(self._cw._(self._landingzonemsg))}
+        return lzone or self._defaultlandingzone % {
+            'msg': xml_escape(self._cw._(self._landingzonemsg))}
 
     def _build_renderer(self, entity, rtype, role):
         return self._cw.vreg['formrenderers'].select(