autopep8: fix E111 indentation is not a multiple of four
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 13 Feb 2019 15:30:50 +0100
changeset 830 a128e1293ce9
parent 829 7fc7aed2c0b2
child 831 da6c6671ce48
autopep8: fix E111 indentation is not a multiple of four
rql/stcheck.py
test/unittest_rqlgen.py
test/unittest_utils.py
tools/rql_analyze.py
--- a/rql/stcheck.py	Wed Feb 13 15:29:38 2019 +0100
+++ b/rql/stcheck.py	Wed Feb 13 15:30:50 2019 +0100
@@ -372,8 +372,8 @@
                 state.error('unknown relation `%s`' % rtype)
             else:
                 if rschema.final and relation.optional not in (None, 'right'):
-                     state.error("optional may only be set on the rhs on final relation `%s`"
-                                 % relation.r_type)
+                    state.error("optional may only be set on the rhs on final relation `%s`"
+                                % relation.r_type)
                 if self.special_relations.get(rtype) == 'uid' and relation.operator() == '=':
                     if state.var_info.get(lhsvar, 0) & VAR_HAS_UID_REL:
                         state.error('can only one uid restriction per variable '
--- a/test/unittest_rqlgen.py	Wed Feb 13 15:29:38 2019 +0100
+++ b/test/unittest_rqlgen.py	Wed Feb 13 15:30:50 2019 +0100
@@ -41,7 +41,7 @@
         """
         rql = self.rql_generator.select('Person')
         self.assertEqual(rql, 'Person X')
-        
+
     def test_select_group(self):
         """tests select with group
         """
@@ -67,7 +67,7 @@
         self.assertEqual(rql, 'Person X\nWHERE X work_for S , S name "Logilab"'
                          ' , X firstname F , X surname S\nGROUPBY X'
                          '\nSORTBY F ASC, S DESC')
-                                        
+
     def test_where(self):
         """tests the where() method behaviour
         """
@@ -83,13 +83,13 @@
         """
         rql = self.rql_generator.groupby(('F', 'S'))
         self.assertEqual(rql, 'GROUPBY F, S')
-        
+
     def test_sortby(self):
         """tests the sortby() method behaviour
         """
         rql = self.rql_generator.sortby(('F ASC', 'S DESC'))
         self.assertEqual(rql, 'SORTBY F ASC, S DESC')
-        
+
     def test_insert(self):
         """tests the insert() method behaviour
         """
@@ -97,7 +97,7 @@
                                                    ('lastname', "Kent")))
         self.assertEqual(rql, 'INSERT Person X: X firstname "Clark",'
                          ' X lastname "Kent"')
-        
+
     def test_update(self):
         """tests the update() method behaviour
         """
@@ -118,7 +118,7 @@
                                          ('lastname', "Kent")))
         self.assertEqual(rql, 'DELETE Person X where X firstname "Clark", '
                          'X lastname "Kent"')
-        
+
 
 if __name__ == '__main__':
     unittest.main()
--- a/test/unittest_utils.py	Wed Feb 13 15:29:38 2019 +0100
+++ b/test/unittest_utils.py	Wed Feb 13 15:30:50 2019 +0100
@@ -32,22 +32,22 @@
 class RQLHandlerClassTest(TestCase):
     """tests that the default handler implements a method for each possible node
     """
-    
+
     def setUp(self):
         self.visitor = Visitor()
-        
+
     def test_methods_1(self):
         tree = parse('Any X where X name "turlututu", X born <= TODAY - 2 OR X born = NULL', {})
         self.visitor.visit(tree)
-        
+
     def test_methods_2(self):
         tree = parse('Insert Person X', {})
         self.visitor.visit(tree)
-        
+
     def test_methods_3(self):
         tree = parse('Set X nom "yo" WHERE X is Person', {'Person':nodes.Constant('Person', 'etype')})
         self.visitor.visit(tree)
-        
+
     def test_methods_4(self):
         tree = parse('Delete Person X', {})
         self.visitor.visit(tree)
@@ -71,6 +71,6 @@
         self.assertEqual(next(varlist), 'AA')
         self.assertEqual(next(varlist), 'AB')
 
-        
+
 if __name__ == '__main__':
     unittest_main()
--- a/tools/rql_analyze.py	Wed Feb 13 15:29:38 2019 +0100
+++ b/tools/rql_analyze.py	Wed Feb 13 15:30:50 2019 +0100
@@ -65,4 +65,4 @@
     an2 = helper2._rql_analyser
     if not cmp_sol(sol1, sol2):
         break
-    
+