autopep8: fix E127 continuation line over-indented for visual indent
authorSimon Chabot <simon.chabot@logilab.fr>
Wed, 13 Feb 2019 18:24:25 +0100
changeset 853 739621276982
parent 852 0fb66fc1a945
child 854 fe2a97f8a99e
autopep8: fix E127 continuation line over-indented for visual indent
__pkginfo__.py
rql/analyze.py
rql/nodes.py
test/unittest_analyze.py
test/unittest_rqlgen.py
tox.ini
--- a/__pkginfo__.py	Wed Feb 13 18:14:10 2019 +0100
+++ b/__pkginfo__.py	Wed Feb 13 18:24:25 2019 +0100
@@ -80,14 +80,14 @@
                    ]
 else:
     ext_modules = [Extension('rql.rql_solve',
-                              ['rql/gecode_solver.cpp'],
-                              libraries=['GecodeInt-3-3-1-r-x86',
-                                         'GecodeKernel-3-3-1-r-x86',
-                                         'GecodeSearch-3-3-1-r-x86',
-                                         'GecodeSupport-3-3-1-r-x86',
-                                         ],
-                              extra_compile_args=['/DGE_VERSION=%s' % GECODE_VERSION, '/EHsc'],
-                              #extra_link_args=['-static-libgcc'],
+                             ['rql/gecode_solver.cpp'],
+                             libraries=['GecodeInt-3-3-1-r-x86',
+                                        'GecodeKernel-3-3-1-r-x86',
+                                        'GecodeSearch-3-3-1-r-x86',
+                                        'GecodeSupport-3-3-1-r-x86',
+                                        ],
+                             extra_compile_args=['/DGE_VERSION=%s' % GECODE_VERSION, '/EHsc'],
+                             #extra_link_args=['-static-libgcc'],
                              )
                    ]
 
--- a/rql/analyze.py	Wed Feb 13 18:14:10 2019 +0100
+++ b/rql/analyze.py	Wed Feb 13 18:24:25 2019 +0100
@@ -526,7 +526,7 @@
                     totypes = set(str(t) for t in toetypes)
                     ptypes = totypes & rhsdomain
                     res.append([([lhsvar], [str(fromtype)]),
-                                  ([rhsvar], list(ptypes))])
+                                ([rhsvar], list(ptypes))])
                     if same_var and (fromtype in totypes):  # ptypes ?
                         var_types.append(fromtype)
             constraints.or_and(res)
--- a/rql/nodes.py	Wed Feb 13 18:14:10 2019 +0100
+++ b/rql/nodes.py	Wed Feb 13 18:24:25 2019 +0100
@@ -41,14 +41,14 @@
 
 
 ETYPE_PYOBJ_MAP = {bool: 'Boolean',
-                    int: 'Int',
-                    float: 'Float',
-                    Decimal: 'Decimal',
-                    str: 'String',
-                    datetime: 'Datetime',
-                    date: 'Date',
-                    time: 'Time',
-                    timedelta: 'Interval',
+                   int: 'Int',
+                   float: 'Float',
+                   Decimal: 'Decimal',
+                   str: 'String',
+                   datetime: 'Datetime',
+                   date: 'Date',
+                   time: 'Time',
+                   timedelta: 'Interval',
                    }
 if sys.version_info < (3,):
     ETYPE_PYOBJ_MAP[long] = 'Int'
--- a/test/unittest_analyze.py	Wed Feb 13 18:14:10 2019 +0100
+++ b/test/unittest_analyze.py	Wed Feb 13 18:24:25 2019 +0100
@@ -93,73 +93,73 @@
         self._types['Person']._specialized_by = [self._types['Student']]
         self._relations = {
             'eid': RelationSchema((('Person', ('Int',)),
-                                      ('Student', ('Int',)),
-                                      ('Company', ('Int',)),
-                                      ('Address', ('Int',)),
-                                      ('Eetype', ('Int',)),
+                                   ('Student', ('Int',)),
+                                   ('Company', ('Int',)),
+                                   ('Address', ('Int',)),
+                                   ('Eetype', ('Int',)),
                                    )
                                   ),
             'creation_date': RelationSchema((('Person', ('Datetime',)),
-                                                ('Student', ('Datetime',)),
-                                                ('Company', ('Datetime',)),
-                                                ('Address', ('Datetime',)),
-                                                ('Eetype', ('Datetime',)),
+                                             ('Student', ('Datetime',)),
+                                             ('Company', ('Datetime',)),
+                                             ('Address', ('Datetime',)),
+                                             ('Eetype', ('Datetime',)),
                                              )
                                             ),
             'name': RelationSchema((('Person', ('String',)),
-                                       ('Student', ('String',)),
-                                       ('Company', ('String',)),
+                                    ('Student', ('String',)),
+                                    ('Company', ('String',)),
                                     )
                                    ),
             'firstname': RelationSchema((('Person', ('String',)),
-                                            ('Student', ('String',)),
+                                         ('Student', ('String',)),
                                          )
                                         ),
             'work_for': RelationSchema((('Person', ('Company',)),
-                                           ('Student', ('Company',)),
+                                        ('Student', ('Company',)),
                                         ),
-                                         card='?*'),
+                                       card='?*'),
             'is': RelationSchema((('Person', ('Eetype',)),
-                                     ('Student', ('Eetype',)),
-                                     ('Company', ('Eetype',)),
-                                     ('Address', ('Eetype',)),
-                                     ('Eetype', ('Eetype',)),
+                                  ('Student', ('Eetype',)),
+                                  ('Company', ('Eetype',)),
+                                  ('Address', ('Eetype',)),
+                                  ('Eetype', ('Eetype',)),
                                   )
                                  ),
             'is_instance_of': RelationSchema((('Person', ('Eetype',)),
-                                               ('Student', ('Eetype',)),
-                                               ('Company', ('Eetype',)),
-                                               ('Address', ('Eetype',)),
-                                               ('Eetype', ('Eetype',)),
+                                              ('Student', ('Eetype',)),
+                                              ('Company', ('Eetype',)),
+                                              ('Address', ('Eetype',)),
+                                              ('Eetype', ('Eetype',)),
                                               )
                                              ),
             'connait': RelationSchema((('Person', ('Person',)),
-                                         ('Student', ('Person',)),
-                                         ('Student', ('Student',)),
-                                         ('Person', ('Student',)),
+                                       ('Student', ('Person',)),
+                                       ('Student', ('Student',)),
+                                       ('Person', ('Student',)),
                                        ),
-                                        symmetric=True),
+                                      symmetric=True),
             'located': RelationSchema((('Person', ('Address',)),
-                                          ('Student', ('Address',)),
-                                          ('Company', ('Address',)),
+                                       ('Student', ('Address',)),
+                                       ('Company', ('Address',)),
                                        )
                                       ),
             'owned_by': RelationSchema((('Person', ('Person',)),
-                                           ('Student', ('Person',)),
-                                           ('Company', ('Person',)),
-                                           ('Eetype', ('Person',)),
+                                        ('Student', ('Person',)),
+                                        ('Company', ('Person',)),
+                                        ('Eetype', ('Person',)),
                                         )
                                        ),
             'identity': RelationSchema((('Person', ('Person',)),
-                                           ('Student', ('Student',)),
-                                           ('Company', ('Company',)),
-                                           ('Address', ('Address',)),
-                                           ('Eetype', ('Eetype',)),
+                                        ('Student', ('Student',)),
+                                        ('Company', ('Company',)),
+                                        ('Address', ('Address',)),
+                                        ('Eetype', ('Eetype',)),
                                         )
                                        ),
             'number': RelationSchema((('Person', ('Int',)),
-                                         ('Student', ('Int',)),
-                                         ('Company', ('Float',)),
+                                      ('Student', ('Int',)),
+                                      ('Company', ('Float',)),
                                       )
                                      ),
             }
--- a/test/unittest_rqlgen.py	Wed Feb 13 18:14:10 2019 +0100
+++ b/test/unittest_rqlgen.py	Wed Feb 13 18:24:25 2019 +0100
@@ -59,9 +59,9 @@
         """
         rql = self.rql_generator.select('Person',
                                         (('X', 'work_for', 'S'),
-                                          ('S', 'name', '"Logilab"'),
-                                          ('X', 'firstname', 'F'),
-                                          ('X', 'surname', 'S')),
+                                         ('S', 'name', '"Logilab"'),
+                                         ('X', 'firstname', 'F'),
+                                         ('X', 'surname', 'S')),
                                         ('X',),
                                         ('F ASC', 'S DESC'))
         self.assertEqual(rql, 'Person X\nWHERE X work_for S , S name "Logilab"'
@@ -72,9 +72,9 @@
         """tests the where() method behaviour
         """
         rql = self.rql_generator.where((('X', 'work_for', 'S'),
-                                         ('S', 'name', '"Logilab"'),
-                                         ('X', 'firstname', 'F'),
-                                         ('X', 'surname', 'S')))
+                                        ('S', 'name', '"Logilab"'),
+                                        ('X', 'firstname', 'F'),
+                                        ('X', 'surname', 'S')))
         self.assertEqual(rql, 'WHERE X work_for S , S name "Logilab" '
                          ', X firstname F , X surname S')
 
--- a/tox.ini	Wed Feb 13 18:14:10 2019 +0100
+++ b/tox.ini	Wed Feb 13 18:24:25 2019 +0100
@@ -11,7 +11,7 @@
 basepython = python3
 deps =
   flake8
-commands = flake8 {posargs:--ignore=E127,E261,E265,E402,E501,E731,E741,F401,F401,F403,F405,F811,F821,F841,E123,E226,W503,E241,W504,E126,E121}
+commands = flake8 {posargs:--ignore=E261,E265,E402,E501,E731,E741,F401,F401,F403,F405,F811,F821,F841,E123,E226,W503,E241,W504,E126,E121}
 
 [pytest]
 python_files = *test_*.py