flake8: fix E713 test for membership should be 'not in'
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Wed, 13 Feb 2019 17:24:55 +0100
changeset 848 fcc4e6158204
parent 847 f8ff67ee0d5a
child 849 c54a59621062
flake8: fix E713 test for membership should be 'not in'
rql/analyze.py
rql/stmts.py
--- a/rql/analyze.py	Wed Feb 13 17:23:28 2019 +0100
+++ b/rql/analyze.py	Wed Feb 13 17:24:55 2019 +0100
@@ -549,7 +549,7 @@
                 for specialization in self.schema.eschema(etype).specialized_by():
                     etypes.add(specialization.type)
         if relation.neged(strict=True):
-            etypes = frozenset(t for t in self._nonfinal_domain if not t in etypes)
+            etypes = frozenset(t for t in self._nonfinal_domain if t not in etypes)
 
         constraints.var_has_types(lhs.name, [str(t) for t in etypes])
 
--- a/rql/stmts.py	Wed Feb 13 17:23:28 2019 +0100
+++ b/rql/stmts.py	Wed Feb 13 17:24:55 2019 +0100
@@ -667,7 +667,7 @@
                     asol[var] = origsol[var]
                 for var in self.aliases:
                     asol[var] = origsol[var]
-                if not asol in newsolutions:
+                if asol not in newsolutions:
                     newsolutions.append(asol)
             self.solutions = newsolutions