Flake8 cubicweb/web/schemaviewer.py
authorjulien tayon <julien.tayon@logilab.fr>
Tue, 04 Jun 2019 09:35:47 +0200
changeset 12639 619210ba8b5e
parent 12638 8466a6dd474e
child 12640 de1c0721656e
Flake8 cubicweb/web/schemaviewer.py
cubicweb/web/schemaviewer.py
flake8-ok-files.txt
--- a/cubicweb/web/schemaviewer.py	Tue Jun 04 09:35:47 2019 +0200
+++ b/cubicweb/web/schemaviewer.py	Tue Jun 04 09:35:47 2019 +0200
@@ -121,7 +121,6 @@
             data.append(', '.join(str(constr) for constr in constraints))
         return data
 
-
     def stereotype(self, name):
         return Span((' <<%s>>' % name,), klass='stereotype')
 
@@ -129,7 +128,7 @@
         """get a layout for an entity schema"""
         etype = eschema.type
         layout = Section(children=' ', klass='clear')
-        layout.append(Link(etype,'&#160;' , id=etype)) # anchor
+        layout.append(Link(etype, '&#160;', id=etype))  # anchor
         title = self.format_eschema(eschema)
         boxchild = [Section(children=(title,), klass='title')]
         data = []
@@ -196,7 +195,7 @@
         if rschema_objects:
             # might be empty
             properties = [p for p in RelationDefinitionSchema.rproperty_defs(rschema_objects[0])
-                          if not p in ('cardinality', 'composite', 'eid')]
+                          if p not in ('cardinality', 'composite', 'eid')]
         else:
             properties = []
         data += [_(prop) for prop in properties]
@@ -221,7 +220,7 @@
                     elif isinstance(val, dict):
                         for key, value in val.items():
                             if isinstance(value, (list, tuple)):
-                                val[key] = ', '.join(sorted( str(v) for v in value))
+                                val[key] = ', '.join(sorted(str(v) for v in value))
                         val = str(val)
 
                     elif isinstance(val, (list, tuple)):
--- a/flake8-ok-files.txt	Tue Jun 04 09:35:47 2019 +0200
+++ b/flake8-ok-files.txt	Tue Jun 04 09:35:47 2019 +0200
@@ -116,6 +116,7 @@
 cubicweb/web/application.py
 cubicweb/web/box.py
 cubicweb/web/formwidgets.py
+cubicweb/web/schemaviewer.py
 cubicweb/web/test/data/entities.py
 cubicweb/web/test/unittest_application.py
 cubicweb/web/test/unittest_http_headers.py