Drop commented code causing of flake8 errors
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 13 Feb 2019 15:31:44 +0100
changeset 831 da6c6671ce48
parent 830 a128e1293ce9
child 832 f6ecdf1de47b
Drop commented code causing of flake8 errors
rql/stcheck.py
test/unittest_parser.py
test/unittest_stcheck.py
--- a/rql/stcheck.py	Wed Feb 13 15:30:50 2019 +0100
+++ b/rql/stcheck.py	Wed Feb 13 15:31:44 2019 +0100
@@ -445,11 +445,6 @@
     def visit_variableref(self, variableref, state):
         #assert len(variableref.children)==0
         #assert not variableref.parent is variableref
-##         try:
-##             assert variableref.variable in variableref.root().defined_vars.values(), \
-##                    (variableref.root(), variableref.variable, variableref.root().defined_vars)
-##         except AttributeError:
-##             raise Exception((variableref.root(), variableref.variable))
         pass
 
     def leave_variableref(self, node, state):
--- a/test/unittest_parser.py	Wed Feb 13 15:30:50 2019 +0100
+++ b/test/unittest_parser.py	Wed Feb 13 15:31:44 2019 +0100
@@ -38,7 +38,6 @@
     'INSERT Person X : X name "bidule" or X name "chouette";',
     'Any X WHERE "YO" related "UPI";',
     # FIXME: incorrect because X/Y are not bound, not a syntax error
-#    'SET X travaille Y;',
     "Personne P WHERE OFFSET 200;",
 
     'Any X GROUPBY X ORDERBY X WHERE X nom "toto" UNION Any X GROUPBY X ORDERBY X WHERE X firstname "toto";',
@@ -113,7 +112,6 @@
     'Any X WHERE X eid > 12;',
     'DELETE Any X WHERE X eid > 12;',
 
-#    'Any X WHERE 5 in_state X;',
     '(Any X WHERE X eid > 12) UNION (Any X WHERE X eid < 23);',
     '(Any X WHERE X nom "toto") UNION (Any X WHERE X firstname "toto");',
     '(Any X GROUPBY X WHERE X nom "toto") UNION (Any X GROUPBY X ORDERBY X WHERE X firstname "toto");',
@@ -327,8 +325,6 @@
     def test_spec(self):
         """test all RQL string found in the specification and test they are well parsed"""
         for rql in SPEC_QUERIES:
-#            print("Orig:", rql)
-#            print("Resu:", rqltree)
             with self.subTest(rql=rql):
                 self.parse(rql, True)
 
--- a/test/unittest_stcheck.py	Wed Feb 13 15:30:50 2019 +0100
+++ b/test/unittest_stcheck.py	Wed Feb 13 15:31:44 2019 +0100
@@ -137,9 +137,6 @@
              'Any 12'),
             ('Any X,Y WHERE X eid 0, Y eid 1, X work_for Y',
              'Any 0,1 WHERE 0 work_for 1'),
-# no more supported, use outerjoin explicitly
-#            ('Any X,Y WHERE X work_for Y OR NOT X work_for Y', 'Any X,Y WHERE X? work_for Y?'),
-#            ('Any X,Y WHERE NOT X work_for Y OR X work_for Y', 'Any X,Y WHERE X? work_for Y?'),
             # test symmetric OR rewrite
             ("DISTINCT Any P WHERE P connait S OR S connait P, S name 'chouette'",
              'DISTINCT Any P WHERE P connait S, S name "chouette"'),