jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/474460 )

Change subject: [PEP8] Fix W504 errors in 7 files
......................................................................

[PEP8] Fix W504 errors in 7 files

Fixed W504 errors in order to have a consistent code style.
This has the result of introducing W503 instead.
W504: unary operator at end of line.
W503: unary operator at beginning of line.

Bug: T207836
Change-Id: I9a9c255d136436b10c83571f7241544ca7e022ed
---
M docs/conf.py
M scripts/cfd.py
M scripts/imagetransfer.py
M scripts/listpages.py
M scripts/nowcommons.py
M scripts/pagefromfile.py
6 files changed, 19 insertions(+), 19 deletions(-)

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



diff --git a/docs/conf.py b/docs/conf.py
index 14f7986..4854e2d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -284,8 +284,8 @@
         elif name == 'scripts.login' and '*' in line:
             # Escape star wildcard in scripts/login.py
             lines[index] = line.replace('*', '\\*')
-        elif (line.endswith(':') and not line.lstrip().startswith(':') and
-                'Traceback (most recent call last)' not in line):
+        elif (line.endswith(':') and not line.lstrip().startswith(':')
+                and 'Traceback (most recent call last)' not in line):
             # Initiate code block except pagegenerator arguments follows
             for afterline in lines[index + 1:]:
                 if afterline == '':
diff --git a/scripts/cfd.py b/scripts/cfd.py
index 86f7073..e11e3c3 100755
--- a/scripts/cfd.py
+++ b/scripts/cfd.py
@@ -144,14 +144,14 @@
             thisDay = findDay(src, day)
             if mode == 'Move' and thisDay != 'None':
                 summary = (
-                    'Robot - Moving category ' + src + ' to [[:Category:' +
-                    dest + ']] per [[WP:CFD|CFD]] at ' + thisDay + '.')
+                    'Robot - Moving category ' + src + ' to [[:Category:'
+                    + dest + ']] per [[WP:CFD|CFD]] at ' + thisDay + '.')
                 action_summary = \
                     'Robot - Result of [[WP:CFD|CFD]] at ' + thisDay + '.'
             elif mode == 'Speedy':
                 summary = (
-                    'Robot - Speedily moving category ' + src +
-                    ' to [[:Category:' + dest + ']] per [[WP:CFDS|CFDS]].')
+                    'Robot - Speedily moving category ' + src
+                    + ' to [[:Category:' + dest + ']] per [[WP:CFDS|CFDS]].')
                 action_summary = 'Robot - Speedily moved per [[WP:CFDS|CFDS]].'
             else:
                 continue
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index 16189ab..ae7c4dc 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -200,8 +200,8 @@
                     # add the nowCommons template.
                     pywikibot.output('Adding nowCommons template to '
                                      + sourceImagePage.title())
-                    sourceImagePage.put(sourceImagePage.get() + '\n\n' +
-                                        nowCommonsTemplate[sourceSite.lang]
+                    sourceImagePage.put(sourceImagePage.get() + '\n\n'
+                                        + nowCommonsTemplate[sourceSite.lang]
                                         % targetFilename,
                                         summary=reason)

@@ -268,9 +268,9 @@
                         break
                     todo = int(todo)
                 if todo in range(len(imagelist)):
-                    if (imagelist[todo].fileIsShared() and
-                            imagelist[todo].site.image_repository() ==
-                            self.targetSite.image_repository()):
+                    if (imagelist[todo].fileIsShared()
+                            and imagelist[todo].site.image_repository()
+                            == self.targetSite.image_repository()):
                         pywikibot.output(
                             'The image is already shared on {0}.'
                             .format(self.targetSite.image_repository()))
diff --git a/scripts/listpages.py b/scripts/listpages.py
index 9675384..8b23040 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -157,9 +157,9 @@
         """Output formatted string."""
         fmt = self.fmt_options.get(fmt, fmt)
         # If selected format requires trs_title, outputlang must be set.
-        if (fmt in self.fmt_need_lang or
-                'trs_title' in fmt and
-                self.outputlang is None):
+        if (fmt in self.fmt_need_lang
+                or 'trs_title' in fmt
+                and self.outputlang is None):
             raise ValueError(
                 "Required format code needs 'outputlang' parameter set.")
         if num is None:
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index 3e7935b..5f12583 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -275,8 +275,8 @@
                     continue
                 commonsImagePage = pywikibot.FilePage(commons, 'Image:'
                                                       + filenameOnCommons)
-                if (localImagePage.title(with_ns=False) !=
-                        commonsImagePage.title(with_ns=False)):
+                if (localImagePage.title(with_ns=False)
+                        != commonsImagePage.title(with_ns=False)):
                     usingPages = list(localImagePage.usingPages())
                     if usingPages and usingPages != [localImagePage]:
                         pywikibot.output(color_format(
diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py
index a62c801..8c1f1ec 100755
--- a/scripts/pagefromfile.py
+++ b/scripts/pagefromfile.py
@@ -153,9 +153,9 @@
                 return
             pagecontents = page.text
             nocontent = self.getOption('nocontent')
-            if nocontent and (
-                    nocontent in pagecontents or
-                    nocontent.lower() in pagecontents):
+            if (nocontent
+                    and (nocontent in pagecontents
+                         or nocontent.lower() in pagecontents)):
                 pywikibot.output('Page has {0} so it is skipped'
                                  .format(nocontent))
                 return

--
To view, visit https://gerrit.wikimedia.org/r/474460
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9a9c255d136436b10c83571f7241544ca7e022ed
Gerrit-Change-Number: 474460
Gerrit-PatchSet: 2
Gerrit-Owner: Nils ANDRE <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Dvorapa <[email protected]>
Gerrit-Reviewer: Framawiki <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to