jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[PEP8] Fix W504 issues across python scripts (XVII)

Fixed breaking of line after a binary operator. The changes moved line
breaks in tests/textlib_tests.py and pywikibot/data/api.py. This is a
submission for GCI.

Bug: T207836
Change-Id: If3c16841cfffb020c3f50aea0554e0a76d3732de
---
M pywikibot/data/api.py
M tests/textlib_tests.py
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index ed09a26..f7e4745 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -802,9 +802,9 @@
if 'path' not in mod_data:
# query modules often contain 'ApiQuery' and have a suffix.
# 'ApiQuery' alone is the action 'query'
- if 'querytype' in mod_data or (
- php_class and len(php_class) > 8 and
- 'ApiQuery' in php_class):
+ if ('querytype' in mod_data
+ or php_class and len(php_class) > 8
+ and 'ApiQuery' in php_class):
mod_data['path'] = 'query+' + name
else:
mod_data['path'] = name
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py
index ad659df..33a49cb 100644
--- a/tests/textlib_tests.py
+++ b/tests/textlib_tests.py
@@ -1428,8 +1428,8 @@

def test_replace_tags_interwiki(self):
"""Test replacing not inside interwiki links."""
- if ('es' not in self.site.family.langs or
- 'ey' in self.site.family.langs):
+ if ('es' not in self.site.family.langs
+ or 'ey' in self.site.family.langs):
raise unittest.SkipTest("family {} doesn't have languages"
.format(self.site))


To view, visit change 477417. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If3c16841cfffb020c3f50aea0554e0a76d3732de
Gerrit-Change-Number: 477417
Gerrit-PatchSet: 14
Gerrit-Owner: Stella <joannage87@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Urbanecm <martin.urbanec@wikimedia.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)