jenkins-bot has submitted this change and it was merged.

Change subject: Fix E127 unaligned indents in tests
......................................................................


Fix E127 unaligned indents in tests

Change-Id: I35e8e9fb88feecdcfed7b117d8f073378d503b48
---
M tests/__init__.py
M tests/aspects.py
M tests/dry_api_tests.py
M tests/dry_site_tests.py
M tests/http_tests.py
M tests/namespace_tests.py
M tests/page_tests.py
M tests/script_tests.py
M tests/textlib_tests.py
M tests/wikibase_tests.py
M tests/wikidataquery_tests.py
11 files changed, 30 insertions(+), 42 deletions(-)

Approvals:
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/__init__.py b/tests/__init__.py
index 556162f..83ad585 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -139,9 +139,9 @@
               % disabled_tests)
 
     modules = [module
-               for module in library_test_modules +
-                             extra_test_modules +
-                             script_test_modules
+               for module in (library_test_modules +
+                              extra_test_modules +
+                              script_test_modules)
                if module not in disabled_test_modules]
 
     test_list = []
diff --git a/tests/aspects.py b/tests/aspects.py
index 7615736..c6ff682 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -875,8 +875,7 @@
 
         usernames = config.sysopnames if sysop else config.usernames
 
-        return code in usernames[family] or \
-           '*' in usernames[family]
+        return code in usernames[family] or '*' in usernames[family]
 
     def __init__(self, *args, **kwargs):
         """Constructor."""
diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py
index de14294..f1c705c 100644
--- a/tests/dry_api_tests.py
+++ b/tests/dry_api_tests.py
@@ -167,8 +167,8 @@
         req = CachedRequest(expiry=1, site=self.mocksite,
                             action='query', meta='siteinfo')
 
-        expect = u'MockSite()User(User:محمد الفلسطيني)' + \
-                  "[('action', 'query'), ('meta', 'siteinfo')]"
+        expect = (u'MockSite()User(User:محمد الفلسطيني)' +
+                  "[('action', 'query'), ('meta', 'siteinfo')]")
 
         self.assertEqual(repr(req._uniquedescriptionstr()), repr(expect))
 
diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py
index 5b33602..3efa3f3 100644
--- a/tests/dry_site_tests.py
+++ b/tests/dry_site_tests.py
@@ -53,7 +53,7 @@
         x._username = ('foo', None)
 
         self.assertEqual('Pywikibot/' + pywikibot.__release__,
-                          user_agent(x, format_string='{pwb}'))
+                         user_agent(x, format_string='{pwb}'))
 
         self.assertEqual(x.family.name,
                          user_agent(x, format_string='{family}'))
diff --git a/tests/http_tests.py b/tests/http_tests.py
index 66ec833..ff8337c 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -304,7 +304,7 @@
         self.assertEqual('', http.user_agent(format_string='{lang}'))
 
         self.assertEqual('Pywikibot/' + pywikibot.__release__,
-                          http.user_agent(format_string='{pwb}'))
+                         http.user_agent(format_string='{pwb}'))
         self.assertNotIn(' ', http.user_agent(format_string=' {pwb} '))
 
         self.assertIn('Pywikibot/' + pywikibot.__release__,
diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py
index 81000a3..4b497f2 100644
--- a/tests/namespace_tests.py
+++ b/tests/namespace_tests.py
@@ -229,9 +229,9 @@
         self.assertEqual(Namespace.resolve([file_ns]), [file_ns])
 
         self.assertEqual(Namespace.resolve([file_ns, special_ns]),
-                                           [file_ns, special_ns])
+                         [file_ns, special_ns])
         self.assertEqual(Namespace.resolve([file_ns, file_ns]),
-                                           [file_ns, file_ns])
+                         [file_ns, file_ns])
 
         self.assertEqual(Namespace.resolve(6), [file_ns])
         self.assertEqual(Namespace.resolve('File'), [file_ns])
@@ -303,8 +303,8 @@
 
         positive_namespaces = set(namespaces) - excluded_namespaces
 
-        self.assertEqual(len(namespaces), len(positive_namespaces) +
-                                          len(excluded_namespaces))
+        self.assertEqual(len(namespaces),
+                         len(positive_namespaces) + len(excluded_namespaces))
 
 
 if __name__ == '__main__':
diff --git a/tests/page_tests.py b/tests/page_tests.py
index 921d088..d170cab 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -551,8 +551,8 @@
         # Ban all compliant bots not in the list, syntax for de wp.
         page.text = '{{nobots|HagermanBot,Werdnabot}}'
         self.assertTrue(page.botMayEdit(),
-                         u'%s: %s but user=%s'
-                         % (page.text, page.botMayEdit(), user))
+                        u'%s: %s but user=%s'
+                        % (page.text, page.botMayEdit(), user))
 
         # Ban all compliant bots not in the list, syntax for de wp.
         page.text = '{{nobots|%s, HagermanBot,Werdnabot}}' % user
diff --git a/tests/script_tests.py b/tests/script_tests.py
index aea9dcc..7d7f430 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -285,7 +285,7 @@
                     # But also complain if there is any stdout
                     # but ignore shell.py emiting its '>>> ' prompt.
                     if ((script_name == 'shell' and
-                                set(result['stdout']).issubset(set('> \n'))) or
+                            set(result['stdout']).issubset(set('> \n'))) or
                             result['stdout'] == ''):
                         result['stdout'] = None
                     self.assertIsNone(result['stdout'])
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py
index 903c34f..3d9c2a3 100644
--- a/tests/textlib_tests.py
+++ b/tests/textlib_tests.py
@@ -104,7 +104,7 @@
     dry = True
 
     catresult = ('[[Category:Cat1]]%(LS)s[[Category:Cat2]]%(LS)s'
-                          % {'LS': config.LS})
+                 % {'LS': config.LS})
 
     def test_category_format_raw(self):
         self.assertEqual(self.catresult,
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index fc1038e..f3bf135 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -435,8 +435,8 @@
         # and that exception should refer to the source title 'Test page'
         # not the Item being created.
         self.assertRaisesRegex(pywikibot.NoPage, 'Test page',
-                                pywikibot.ItemPage.fromPage,
-                                page, lazy_load=False)
+                               pywikibot.ItemPage.fromPage,
+                               page, lazy_load=False)
 
         item = pywikibot.ItemPage.fromPage(page, lazy_load=True)
 
@@ -643,26 +643,16 @@
 
     def setUp(self):
         super(TestWriteNormalizeData, self).setUp()
-        self.data_out = {'aliases':
-                         {'en':
-                            [
-                                {'language': 'en',
-                                 'value': 'Bah'}
-                            ],
-                          },
-                         'labels':
-                          {'en':
-                             {'language': 'en',
-                              'value': 'Foo'},
-                           }
-                         }
+        self.data_out = {
+            'aliases': {'en': [{'language': 'en', 'value': 'Bah'}]},
+            'labels': {'en': {'language': 'en', 'value': 'Foo'}},
+        }
 
     def test_normalize_data(self):
-        data_in = {'aliases':
-                   {'en': ['Bah']},
-                   'labels':
-                   {'en': 'Foo'},
-                   }
+        data_in = {
+            'aliases': {'en': ['Bah']},
+            'labels': {'en': 'Foo'},
+        }
 
         response = WikibasePage._normalizeData(data_in)
         self.assertEqual(response, self.data_out)
@@ -881,8 +871,8 @@
         self.assertRaises(pywikibot.WikiBaseError,
                           pywikibot.ItemPage.fromPage, self.wdp)
         self.assertRaisesRegex(pywikibot.WikiBaseError,
-                                'no transcluded data',
-                                self.wdp.data_item)
+                               'no transcluded data',
+                               self.wdp.data_item)
 
 
 class TestJSON(WikidataTestCase):
diff --git a/tests/wikidataquery_tests.py b/tests/wikidataquery_tests.py
index 07822f0..04266c5 100644
--- a/tests/wikidataquery_tests.py
+++ b/tests/wikidataquery_tests.py
@@ -105,14 +105,13 @@
         self.assertEqual(str(q), "claim[99]")
 
         q = query.HasClaim(PropertyPage(self.repo, "P99"),
-                            ItemPage(self.repo, "Q100"))
+                           ItemPage(self.repo, "Q100"))
         self.assertEqual(str(q), "claim[99:100]")
 
         q = query.HasClaim(99, [100, PropertyPage(self.repo, "P101")])
         self.assertEqual(str(q), "claim[99:100,101]")
 
-        q = query.StringClaim(PropertyPage(self.repo, "P99"),
-                                "Hello")
+        q = query.StringClaim(PropertyPage(self.repo, "P99"), "Hello")
         self.assertEqual(str(q), 'string[99:"Hello"]')
 
         q = query.Tree(ItemPage(self.repo, "Q92"), [1], 2)

-- 
To view, visit https://gerrit.wikimedia.org/r/186340
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I35e8e9fb88feecdcfed7b117d8f073378d503b48
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: XZise <commodorefabia...@gmx.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to