Flake8 cubicweb/web/views/autoform.py 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 27 Jun 2019 12:27:37 +0200
branch3.26
changeset 12676 c96aa316d06b
parent 12675 ea89ca9017c4
child 12677 9f03df82f8de
Flake8 cubicweb/web/views/autoform.py Fixes: cubicweb/web/views/autoform.py:703: [E122] continuation line missing indentation or outdented cubicweb/web/views/autoform.py:704: [E122] continuation line missing indentation or outdented cubicweb/web/views/autoform.py:819: [W504] line break after binary operator cubicweb/web/views/autoform.py:820: [E125] continuation line with same indent as next logical line cubicweb/web/views/autoform.py:961: [W504] line break after binary operator cubicweb/web/views/autoform.py:962: [E126] continuation line over-indented for hanging indent
cubicweb/web/views/autoform.py
flake8-ok-files.txt
--- a/cubicweb/web/views/autoform.py	Thu Jun 27 12:13:21 2019 +0200
+++ b/cubicweb/web/views/autoform.py	Thu Jun 27 12:27:37 2019 +0200
@@ -700,8 +700,8 @@
   </select>
 </div>
 """ % (hidden and 'hidden' or '', divid, selectid,
-       xml_escape(json_dumps(entity.eid)), is_cell and 'true' or 'null',
-       relname, '\n'.join(options))
+            xml_escape(json_dumps(entity.eid)), is_cell and 'true' or 'null',
+            relname, '\n'.join(options))
 
     def _get_select_options(self, entity, rschema, role):
         """add options to search among all entities of each possible type"""
@@ -816,8 +816,8 @@
         if self.formtype == 'main':
             # add the generic relation field if necessary
             if entity.has_eid() and (
-                self.display_fields is None or
-                '_cw_generic_field' in self.display_fields):
+                    self.display_fields is None
+                    or '_cw_generic_field' in self.display_fields):
                 try:
                     field = self.field_by_name('_cw_generic_field')
                 except f.FieldNotFound:
@@ -957,9 +957,9 @@
         relation.
         """
         return (self.should_display_add_new_relation_link(
-            rschema, existing, card) and
-                self.check_inlined_rdef_permissions(
-                    rschema, role, tschema, ttype))
+            rschema, existing, card)
+            and self.check_inlined_rdef_permissions(
+            rschema, role, tschema, ttype))
 
     def check_inlined_rdef_permissions(self, rschema, role, tschema, ttype):
         """return true if permissions are granted on the inlined object and
--- a/flake8-ok-files.txt	Thu Jun 27 12:13:21 2019 +0200
+++ b/flake8-ok-files.txt	Thu Jun 27 12:27:37 2019 +0200
@@ -123,6 +123,7 @@
 cubicweb/web/test/unittest_views_cwsources.py
 cubicweb/web/test/unittest_views_json.py
 cubicweb/web/views/authentication.py
+cubicweb/web/views/autoform.py
 cubicweb/web/views/cwuser.py
 cubicweb/web/views/editcontroller.py
 cubicweb/web/views/json.py