[cleanup] flake8 rtags.py
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Nov 2016 16:05:06 +0100
changeset 11885 e93a01a69035
parent 11884 6186cd15a46d
child 11886 c5c041ba35b8
[cleanup] flake8 rtags.py
cubicweb/rtags.py
flake8-ok-files.txt
--- a/cubicweb/rtags.py	Wed Dec 14 11:13:46 2016 +0100
+++ b/cubicweb/rtags.py	Wed Nov 09 16:05:06 2016 +0100
@@ -100,7 +100,7 @@
         if check:
             for (stype, rtype, otype, tagged), value in list(self._tagdefs.items()):
                 for ertype in (stype, rtype, otype):
-                    if ertype != '*' and not ertype in schema:
+                    if ertype != '*' and ertype not in schema:
                         self.warning('removing rtag %s: %s, %s undefined in schema',
                                      (stype, rtype, otype, tagged), value, ertype)
                         self.del_rtag(stype, rtype, otype, tagged)
@@ -142,8 +142,8 @@
         assert len(key) == 4, 'bad key: %s' % list(key)
         if self._allowed_values is not None:
             assert tag in self._allowed_values, \
-                   '%r is not an allowed tag (should be in %s)' % (
-                tag, self._allowed_values)
+                '%r is not an allowed tag (should be in %s)' % (
+                    tag, self._allowed_values)
         self._tagdefs[_ensure_str_key(key)] = tag
         return tag
 
@@ -157,7 +157,6 @@
         else:
             self.tag_object_of((desttype, attr, etype), *args, **kwargs)
 
-
     # rtag runtime api ########################################################
 
     def del_rtag(self, *key):
@@ -178,7 +177,7 @@
 
     # these are overridden by set_log_methods below
     # only defining here to prevent pylint from complaining
-    info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
+    info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None
 
 
 class RelationTagsSet(RelationTags):
--- a/flake8-ok-files.txt	Wed Dec 14 11:13:46 2016 +0100
+++ b/flake8-ok-files.txt	Wed Nov 09 16:05:06 2016 +0100
@@ -31,6 +31,7 @@
 cubicweb/hooks/test/unittest_syncsession.py
 cubicweb/pylintext.py
 cubicweb/rset.py
+cubicweb/rtags.py
 cubicweb/server/repository.py
 cubicweb/server/rqlannotation.py
 cubicweb/server/schema2sql.py