[PATCH 2 of 5] [pep8] not in and space after "("

julien tayon julien.tayon at logilab.fr
Fri Jun 7 15:40:04 CEST 2019


# HG changeset patch
# User julien tayon <julien.tayon at logilab.fr>
# Date 1559633747 -7200
#      Tue Jun 04 09:35:47 2019 +0200
# Node ID 76236807cb1d9e89eeb2d2bdef4b9a0a08319fad
# Parent  41a7b43c31da05fea7a8a6e74d062a6352202a85
[pep8] not in and space after "("

diff --git a/cubicweb/web/schemaviewer.py b/cubicweb/web/schemaviewer.py
--- a/cubicweb/web/schemaviewer.py
+++ b/cubicweb/web/schemaviewer.py
@@ -122,7 +122,6 @@ class SchemaViewer(object):
             data.append(', '.join(str(constr) for constr in constraints))
         return data
 
-
     def stereotype(self, name):
         return Span((' <<%s>>' % name,), klass='stereotype')
 
@@ -130,7 +129,7 @@ class SchemaViewer(object):
         """get a layout for an entity schema"""
         etype = eschema.type
         layout = Section(children=' ', klass='clear')
-        layout.append(Link(etype,' ' , id=etype)) # anchor
+        layout.append(Link(etype, ' ', id=etype))  # anchor
         title = self.format_eschema(eschema)
         boxchild = [Section(children=(title,), klass='title')]
         data = []
@@ -197,7 +196,7 @@ class SchemaViewer(object):
         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]
@@ -222,7 +221,7 @@ class SchemaViewer(object):
                     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)):



More information about the cubicweb-devel mailing list